Hiiiii, loving netlify for many reasons but redirects based on country or language are problematic.
We’re using NextJS with EN as our default locale and FR etc for some other languages.
Eg: ourdomain.com/foobar
and ourdomain.com/fr/foobar
That is all fine until we try to redirect people in France to the fr language site:
[[redirects]]
from = "/*"
to = "/fr/:splat"
conditions = { Country = ["fr"] }
This can kinda work but it also affects or breaks /fr links for people in France.
(Another side effect is that the SSG prerender seems to omit the root /fr page.)
How do other projects tackle this?
Many thanks,
George
PS: We’ve also discovered that redirects with accents do not work.
Both of these are defined in our _redirects file but only one works.
Do we need to encode non-ascii characters in some way?
https://eu.yotoplay.com/demarrage
https://eu.yotoplay.com/démarrage