I’m developing a website using gatsby and netlify.
I want to redirect users based a of Country, so i created a _redirects file.
/* /fr/:splat 302 Country=FR /* /en/:splat 302
The redirect works but all the assets are redirected too. I have no issues when I’m using Language condition or no condition. This happen just with the Country condition.
I seems that the country redirect is done even if a file is found at the given url. The other redirects are done just if the file is not found.
How can I fix that ?
Edit : I found are workaround but it’s not really seo friendly (two 302 redirects).
/country_redirect/* /fr/:splat 302 Country=FR /country_redirect/* /en/:splat 302 /* /country_redirect/:splat 302