Strategy prefix
does not forward to default locale from /
if SSG
#3164
Unanswered
frederikheld
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I haven't found a workaround, there are several open issues to do with this an the lack of recent commits to this repo has me considering moving away from this nuxt plugin 🫤 |
Beta Was this translation helpful? Give feedback.
1 reply
-
It’s not the ideal solution, but as a workaround in our last project, we set up a redirect from the root to the default locale. This should fix the issue locally and the redirects should then be passed to your platform (we used Cloudflare).
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm generating static sites with
nuxi generate
. If i18n strategy isprefix
, this will not generate an index.html in the root of.output/public
but only in the sub directories for the language codes. This makes sense, the problem is that the user will not be forwarded to the default domain or the one that is detected in the browser if they open my url at/
.This is confusing, as in dev mode, forwarding works. It just does not work in SSG generated pages.
So my workaround is to use
prefix_and_default
, but then the default locale will not be forwarded to the language code.Is there any way to use strategy
prefix
with forwarding to the respective language code for all languages in SSG mode?Beta Was this translation helpful? Give feedback.
All reactions