You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.6.1
Node v20.12.2
System Linux (x64)
Package Manager pnpm
Output hybrid
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
with the recently added manual i18n routing strategy, and this middlwware, i want to redirect the "/" root route to the default locale "/en".
in a production build, when the src/pages/404.astro file has export const prerender = false, i get the expected 307 redirect. however, when 404.astro has export const prerender = true i get a 404.
to reproduce:
git clone git@github.com:stefanprobst/issue-astro-i18n-manual.git && cd issue-astro-i18n-manual && pnpm install
pnpm run build
pnpm run preview
curl -i http://localhost:3000 which prints: "HTTP/1.1 404 Not Found"
now, change the prerender mode in 404.astro to false:
sed -i "s/prerender = true/prerender = false/" src/pages/404.astro
pnpm run build
pnpm run preview
curl -i http://localhost:3000 which prints: "HTTP/1.1 307 Temporary Redirect"
What's the expected result?
root route "/" should be redirected to default locale "/en" when 404.astro has export const prerender = true (or with output: "hybrid").
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
with the recently added
manual
i18n routing strategy, and this middlwware, i want to redirect the "/" root route to the default locale "/en".in a production build, when the
src/pages/404.astro
file hasexport const prerender = false
, i get the expected 307 redirect. however, when404.astro
hasexport const prerender = true
i get a 404.to reproduce:
git clone git@github.com:stefanprobst/issue-astro-i18n-manual.git && cd issue-astro-i18n-manual && pnpm install
pnpm run build
pnpm run preview
curl -i http://localhost:3000
which prints: "HTTP/1.1 404 Not Found"now, change the prerender mode in 404.astro to
false
:sed -i "s/prerender = true/prerender = false/" src/pages/404.astro
pnpm run build
pnpm run preview
curl -i http://localhost:3000
which prints: "HTTP/1.1 307 Temporary Redirect"What's the expected result?
root route "/" should be redirected to default locale "/en" when
404.astro
hasexport const prerender = true
(or withoutput: "hybrid"
).Link to Minimal Reproducible Example
https://github.com/stefanprobst/issue-astro-i18n-manual
Participation
The text was updated successfully, but these errors were encountered: