I just created a new structure for a website, and I need some help on redirecting to new places.
The code that works is here, but I guess this can be optimized a lot.
----- Start Code ------
location = /nl {
rewrite ^ $scheme://$server_name permanent;
}
location = /nl/ {
rewrite ^ $scheme://$server_name permanent;
}
location = /en {
rewrite ^ $scheme://$server_name permanent;
}
location = /en/ {
rewrite ^ $scheme://$server_name permanent;
}
location = /nl/contact {
rewrite ^ $scheme://$server_name/contact/ permanent;
}
location = /en/contact {
rewrite ^ $scheme://$server_name/contact/ permanent;
}
----- End Code ------