I want to check if a parameter is present in a url in nginx and then rewrite. How can i do that?
The color is dynamic in the URLs
For e.g
If url is
http://website.com/lunch-box/xxxxxabc
then redirect user tohttp://website.com/lunch-box/
.If URL is
http://website.com/lunch-box/xxxxxabc/ABCD123
no need to redirect. Need to load as it is.
I want to redirect if URL is matched. and
xxxxxabc
is dynamic text.
nginx version: nginx/1.16.1