Hello!
I’m attempting to set up a redirect for my site such that when I press on a “pricing” button users in the UK will go to /pricing/GB (instead of the normal /pricing route).
This post was helpful, but does not seem to work for all cases.
When I go directly to the /pricing URL with a UK IP, I correctly get redirected to /pricing/gb. However, if from my home page /
I press on a Gatsby , the redirect is ignored.
I’m using Gatsby’s createRedirect with the gatsby-plugin-netlify
plugin. My redirect in gatsby-node.js
looks like:
createRedirect({
force: true,
fromPath: '/pricing',
toPath: `/pricing/gb`,
Country: 'GB',
redirectInBrowser: true,
statusCode: 200,
})
I thought redirectInBrowser
was what I was looking for (" set redirectInBrowser
to true and Gatsby will handle redirecting in the client as well"), but it doesn’t appear to work.
Any advice on how to proceed or debug?
I’m hoping to avoid building an entirely different site for GB (as is suggested by this post).
Thank you!