Country Redirect Question


We have a physical file pricing.html
We use Pretty Urls. So final URL is

An example we want to redirect to

If we create a redirect rule as follows.
from = “/pricing.html”
to = “/?country=nz”
status = 301
force = true
conditions = {Country = [“nz”]}

When visiting this works as expected.

If we visit a redirect does not happen.

We created another redirect rule.

from = “/pricing”
to = “/?country=nz”
status = 301
force = true
conditions = {Country = [“nz”]}

This does not work either.


Hey @skiltz

Those redirects are fine. I deployed a test happy-poincare-751dfa using them and in both cases when browsing from NZ (via VPN) I was redirected.

Do you have other redirects in the netlify.toml, or in a _redirects file? Rules are processed top down and _redirects first then netlify.toml as per documentation.

Yeah I do have a heap of redirect in the _redirect files. None of them to do with pricing however.

Do you have a redirect for /* in the _redirects file?

Nope. Best best bet would be for me to delete all in _redirect file and see if that fixes and add back in if that’s the case.

Test removing the _redirects. If that does fix things, then there is something in there stopping the pricing redirect working.

Thanks for the help much appreciated. This actually appears to be working now. I’m really not sure what I changed. But it’s resolved. Really appreciate the quick help. You are a wonderful person for helping the community.

1 Like

Great that it’s working @skiltz.

Perhaps the wind changed direction and blew everything into the correct place :man_shrugging: