My dynamically generated pages’ URLs used to be like this:
http://domain.tld/folder/dynamic_label_1/dynamic_label_2/the_rest_...
All pages however now, are moved to:
http://domain.tld/folder/dynamic_label_2-dynamic_label_1/the_rest_...
Note: the last part of these pages are optional > the_rest_.. Meaning, there isn’t always something after dynamic_label_2-dynamic_label_1/
I’m fairly new to Nginx and can not figure out how to set this redirect rule.
My question is:
What is the redirect rule for nginx server here?
Thank you.
Here, this should do it –
I’m assuming
\wwould be enough for yourdynamic_label. If not, feel free to add the characters inside the(\w+)parenthesis.