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
I'm working on a website that needs to have a region segment before locale and handle redirects accordingly.
Like /page or /en/page/ should lead to /us/en/page.
It might work with new custom prefixes, but the problem is, we get region from the web server, so.. we need to somehow set the correct one. Moreover, region doesn't affect our language, we can have /es/es-mx (don't ask, I know, I know).
So, how should I handle redirects in this case? I am looking at this docs section but can't figure out how to handle it in links, for example.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello.
I'm working on a website that needs to have a region segment before locale and handle redirects accordingly.
Like
/page
or/en/page/
should lead to/us/en/page
.It might work with new custom prefixes, but the problem is, we get region from the web server, so.. we need to somehow set the correct one. Moreover, region doesn't affect our language, we can have
/es/es-mx
(don't ask, I know, I know).So, how should I handle redirects in this case? I am looking at this docs section but can't figure out how to handle it in links, for example.
Beta Was this translation helpful? Give feedback.
All reactions