-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Astro Info
Astro v5.0.6
Node v22.11.0
System macOS (arm64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/sitemap
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The bug is closely related to #12509, which was solved by #12525 when prefixDefaultLocale
is set to false
. However, the bug is still present when prefixDefaultLocale
is set to true
.
Test setup
-
Open a new project and create localized folders, with a folder for the default locale too (i.e.
prefixDefaultLocale
set totrue
), as specified by the i18n guide. -
Create a
404.astro
page in/pages
.
Results
Visiting any URL prefixed with one of the supported languages shows the custom 404 page.
Visiting any URL without a valid language prefix shows a blank page.
Example
With ["es", "en", "fr"]
as supported locales and en
as the default locale:
/en/blabla
=> 404 page
/fr/blabla
=> 404 page
/blabla
=> blank page
/it/blabla
=> blank page
What's the expected result?
Any path that doesn't exist should show the custom 404 page.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-leyrunqm?file=astro.config.mjs
Participation
- I am willing to submit a pull request for this issue.