Hi there!
I’m trying to set up redirects to display different pages based on the visitor’s country, and I’d like to use a 200 redirect for this to avoid changing the URL in the browser address bar.
The redirects are working, however the URL is being changed.
Below is my _headers
file (I’ve downloaded the deployed zip file and validated that _headers
is correct and located at the root)
## Created with gatsby-plugin-netlify
/ /ORGuwgcsEyBle70Vwc5pK/ 200! Country=DE,AT
/store/ /21WtfNyaBXodsFEKRTw9Wz/finnish-store-test/ 200! Country=FI
/de/ /ORGuwgcsEyBle70Vwc5pK/de/ 200! Country=DE,AT
/de/ /2SMqg35tTUJuGgJjkcdBf1/de/ 200! Country=FI
I’m testing this by setting the nf_country
cookie in my browser.
For example when visiting example.netlify.com/store with nf_country
set to FI, I’m redirected to example.netlify.com/21WtfNyaBXodsFEKRTw9Wz/finnish-store-test/ as specified in the redirects but the new URL also shows in the browser address bar.
Thanks in advance for any assistance!