Hey community, I have been going through nginx configuration issues for setting up language based redirection of multi language site.
map "$http_accept_language" $homeUrl {
default http://XYZ.cloudfront.net;
~es http://XYZ.wpengine.com/es/;
~fr http://XYZ.wpengine.com/fr/;
~zh http://XYZ.wpengine.com/zh-hans/;
~de http://XYZ.wpengine.com/de/;
}
The actual issue we are facing is if a user has browser language of Spanish /es if he try's to switch to English it is not being redirected but for any other language like /fr or /de it's working as expected.
Any suggestions on this domain would appreciated and if you need any more info please comment about it.
Edited 1 time(s). Last edit at 04/24/2023 04:55AM by venkateshch.