This is pretty simple, I’m replacing the language redirection mechanism on a client’s website. Before it was JS based and now I’m exploring Netlify Redirects for that.
Here is the _redirects file:
## Created with gatsby-plugin-netlify /404/ /pt/404/ 301! Language=pt /about/ /pt/about/ 301! Language=pt /contacts/ /pt/contacts/ 301! Language=pt / /pt/ 301! Language=pt /privacy/ /pt/privacy/ 301! Language=pt /services/ /pt/services/ 301! Language=pt /work/ /pt/work/ 301! Language=pt /404.html /pt/404.html 301! Language=pt
This is built using the Gatsby Netlify Plugin, so we can automatically create every redirect for every page and language. This is working great when using
netlify dev. But on the actual production link, it’s not working. The site in question is https://sketic.com.
I read a bunch of topics related to this and not a single one had useful info, for me at least. If I manually specify the
accept-language to use a single language (pt) it still doesn’t work. Anyway, it works great with the
netlify dev server, it works as expected and redirects browsers with the PT language to the PT pages.
I’m lost here. Also on the Netlify dashboard redirects are processed correctly without errors. Tried different browsers, DNS providers even and different internet connections. Can this be related to some edge caching issue? It’s the only difference to my local netlify environment.
Any help is appreciated.