Astro Info
$ npx astro info
Astro v5.7.9
Node v23.9.0
System Linux (x64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Astro.config.mjs as follows:
{
// ...
i18n: {
defaultLocale: "en",
locales: [
{ path: "en", codes: ["en", "en-US"] },
{ path: "zh-hans", codes: ["zh-hans", "zh-CN"] },
{ path: 'fr', codes: ['fr'] },
],
routing: {
prefixDefaultLocale: false,
redirectToDefaultLocale: true,
fallbackType: "redirect",
},
fallback: {
"fr": "en",
},
},
// ...
}
However, I got infinite redirects when accessing /fr.

The redirect works when setting fallback as {"fr": "zh-hans"}, which has prefix locale on the URL.
What's the expected result?
Navigate to /fr (page not found) then redirect the default locale (/ in this case).
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-n1hg4cfb?file=astro.config.mjs
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Astro.config.mjs as follows:
However, I got infinite redirects when accessing
/fr.The redirect works when setting
fallbackas{"fr": "zh-hans"}, which has prefix locale on the URL.What's the expected result?
Navigate to
/fr(page not found) then redirect the default locale (/in this case).Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-n1hg4cfb?file=astro.config.mjs
Participation