Atro Build: 404.Astro only handles paths with the pathname https://example.com/404, rather than all non-existing paths. #9854
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Create 2 pages
Now, try entering a path for a page that does not exist. In development mode, 404 handles all unknown paths. However, while running with Astro preview, only 404 is captured.
The 404.astro page only captures routes with the pathname 404, although it should capture all pathnames for which the path does not exist. It was working great in Astro 3. When I switched to Astro 4, this fault appeared.
Steps to reproduce the bug
What's the expected result?
404 should catch all pathnames to pages that do not exist. It works properly in development mode. It does not work after astro build and astro preview.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-vf7clf?file=src%2Fpages%2F404.astro,src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: