Reputation: 143
So I am trying to create location direction where only / would be moved to subfolder /fr but I am failing and can't find the reason. This is nginx docker container exposed on k8s. It's bi lingual app, /fr is default language. Locations /fr and /en exist, rest don't so idea is that all non existing locations are moved to /fr , root doesn't contain index.html so it should be moved to /fr too and /en stays there. Here is the code:
location / {
try_files $uri $uri/ fr/index.html;
}
location = / {
return 301 $scheme://$server_name/fr/index.html;
}
location /de {
try_files $uri $uri/ fr/index.html;
}
location /en {
try_files $uri $uri/ en/index.html;
Everything works except = /
. Thanks for the help!
Upvotes: 0
Views: 24
Reputation: 143
Well everything is working, it's stupid Chrome that caches old responses even though I was testing from incognito mode...
Upvotes: 1