<div dir="auto">If I'm not wrong the rewrite is applied only for the path, not for querystring.<div dir="auto">To parse the arguments using a regex use a map with $args as input or use the $arg_ARGNAME to the rewrite.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jun 30, 2017 20:49, "Alexandre" <<a href="mailto:infos@opendoc.net">infos@opendoc.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you have solutions for my problem ?<br>
<br>
Thank you very much.<br>
<br>
<br>
On Fri, 30 Jun 2017 08:18:50 +0200<br>
Alexandre <<a href="mailto:infos@opendoc.net">infos@opendoc.net</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I have a question, I wish I could parser a url and retrieve fields to<br>
> inject them to another server.<br>
><br>
> However, I can not. Here is my test:<br>
><br>
> URL :<br>
> <a href="http://mywebsite.net/folder1/folder2/hit.php?s=11111&s2=&p=home::index&x2=[box]&apvr=[5.0]&idclient=&na=&ref=" rel="noreferrer" target="_blank">http://mywebsite.net/folder1/<wbr>folder2/hit.php?s=11111&s2=&p=<wbr>home::index&x2=[box]&apvr=[5.<wbr>0]&idclient=&na=&ref=</a><br>
><br>
> location ~ ^/folder1/folder2/ {<br>
><br>
> rewrite<br>
> ^/folder1/folder2/hit.php?s=<wbr>11111&s2=&p=(.*)::(.*)&x2=[<wbr>box]&apvr=[5.0]&idclient=&na=&<wbr>ref= /index.php?arg1=$1&arg2=$2<br>
> break;<br>
><br>
> proxy_pass <a href="http://myinternalsrv.localdom" rel="noreferrer" target="_blank">http://myinternalsrv.localdom</a>;<br>
> }<br>
><br>
> In my test, I want to retrieve the pattern "home" and "index" but it<br>
> does not work. Would you have an idea?<br>
><br>
> Thank you very much for your information.<br>
><br>
> Alex.<br>
> ______________________________<wbr>_________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote></div></div>