-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
redirectOn: 'no prefix'
does not redirect on the root URL
#2132
Comments
redirectOn: 'no prefix'
does not redirect on the root URLredirectOn: 'no prefix'
does not redirect on the root URL
This issue might be related to #2131. |
I guess the following code causes this issue: Lines 294 to 299 in 8dc25cb
Lines 514 to 517 in 8dc25cb
Therefore, I'm stuck here because I'm unsure how to make |
redirectOn: 'no prefix'
does not redirect on the root URLredirectOn: 'no prefix'
does not redirect on the root URL
Thanks! You can workaround with BTW, docs recommend that it is specified default locale |
@kazupon Thanks for the information. In the following repro, I set https://stackblitz.com/edit/nuxt-starter-aj1bpj However, |
@phanect Suffering the same issue. |
I seem that this issue is degraded by #1902 |
@kazupon Thanks so much for working on this! I confirmed this issue is partially fixed in v8.0.0-beta.13. Now if you open https://example.com/, it automatically redirects to https://example.com/en. Here's the repro. Note: This sample code is available on Stackblitz too, but Stackblitz seems to have a bug as of now and it didn't work as expected. Please clone the repro and run it on your local machine. Here's step to reproduce:
Expected: The browser redirects you to http://localhost:3000/ja Let me know if you prefer to close this issue and open another issue for |
Environment
(Here's Stackblitz' environment information)
Reproduction
https://stackblitz.com/edit/nuxt-starter-2yxmzd
Describe the bug
I added
strategy: 'prefix'
andredirectOn: 'no prefix'
to nuxt.config.ts.nuxt.config.ts
If I understand correctly, with this config, if you open / (root URL), it should return 302 and redirect to /en or /ja. (Depending on your
Accept-Language
)However, when you open / (root URL), it returns 404.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: