Hi every one!
I have created a site with Hugo which have two languages: “en” and “it” and written the usual setting:
defaultContentLanguage = “en-us”
defaultContentLanguageInSubdir = true
in the config.toml. I also set up aws lambda edge to redirect user’s requests to page “www_mysite_com” with “accept-language” header to “www_mysite_com/it” if the broswer has this default language and to “www_mysite_com/en” otherwise. Now, the problem is, that the “www_mysite_com/en” page is only a redirect to the “www_mysite_com” which trigger the function again and send the user to “www.mysite.com/it” again, even if the user want to see the english page.
So my question is: why the english home page is a riderect? How can I prevent this behaviour?
Thanks for your work!