rewrite with regex to use proxy_pass

Alexandre infos at
Fri Jun 30 06:18:50 UTC 2017


I have a question, I wish I could parser a url and retrieve fields to
inject them to another server.

However, I can not. Here is my test:

URL :[box]&apvr=[5.0]&idclient=&na=&ref=

location ~ ^/folder1/folder2/ {

        ^/folder1/folder2/hit.php?s=11111&s2=&p=(.*)::(.*)&x2=[box]&apvr=[5.0]&idclient=&na=&ref= /index.php?arg1=$1&arg2=$2

       proxy_pass http://myinternalsrv.localdom;

In my test, I want to retrieve the pattern "home" and "index" but it
does not work. Would you have an idea?

Thank you very much for your information.


More information about the nginx mailing list