for example:
http://www.example.com/127.0.0.1/abc/1
redirect to
http://127.0.0.1/abc/1
ip 127.0.0.1
is dynamically variable
how do I write nginx configuration file
CodePudding user response:
Using RegEx, patterns can be grouped in parentheses and referenced with numbers
rewrite /([^/] )(.*) http://$1$2 permanent;