-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Routes that starts with 404 redirects to 404 page rather than loads properly #11595
Comments
I assigned the issue to you @braden-w We should apply the same fix for 505 pages: astro/packages/astro/src/vite-plugin-astro-server/route.ts Lines 42 to 45 in d532df1
astro/packages/astro/src/i18n/index.ts Line 25 in d532df1
thank you @agrofx1 for the help |
@braden-w any updates? |
@ematipico Just attempted my first PR at #12182 ! Let me know if it looks good. Thanks for the reminder |
@braden-w Your PR looks good to me after a cursory glance through it. On a related note, do you happen to know what mechanism within the codebase is responsible for changing the output file paths from I've been trying to find a way to output these pages the way any other page is output, preferably with a configuration option for people who want their 404 and 500 pages to be at |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In dynamic routes, any dynamic route that starts with "404", even if it is not an exact match like "4045", results in a 404 page.
If there is a
/pages/todos/[id].astro
file, visiting/todos/4045
,/todos/404a
, etc. gives 404 pages such as the following:What's the expected result?
If there is a
/pages/todos/[id].astro
file, visiting/todos/4045
,/todos/404a
, etc. should instead meet pass "4045" or "404a" as a param and load the corresponding todo.Link to Minimal Reproducible Example
https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: