I can't find the way to redirect the lang set in url with Nginx.
I tried this:
location ~ ^/(en|fr|de)/cloud/signup {
return 301 $scheme://cloud.$host/$1/home/new;
}
Also this:
location ^/(.*)/cloud/signup {
return 301 $scheme://cloud.$host/$1/home/new;
}
It doesn't work. Note that setting the lang in location works:
location /en/cloud/signup {
return 301 $scheme://cloud.$host/en/home/new;
}
But I don't want to create 1 location block per language of course. Thanks.