Hello,
I have a simple HTML site (https://armands.site) which works fine, except for one thing:
If you open the site now, it seems as if it does not have actual content, but it has language specific content, in the hu and en folders. So I would like to redirect my visitors to the /hu one if my visitors com from Hungary and to the /en one if the come from elsewhere.
For that I wanted to use Netlify redirects in my netlify.toml file to have a centralised solution, so I wrote the following:
[[redirects]]
from = “/"
to = “/en/:splat”
status = 301
force = true
query = {path = “:path”}
conditions = {Language = [“en”]}
[[redirects]]
from = "/”
to = “/hu/:splat”
status = 301
force = true
query = {path = “:path”}
conditions = {Language = [“hu”]}
I used the asterisk and the splat to match everything after the base URL, so https://armands.site/something would redirect to https://armands.site/en/something or https://armands.site/hu/something based on the actual location, but it does not seem to work, since the redirection is not happening.
What did I do wrong?
Thanks for your answer!
Armand