<div dir="ltr">Ok, thanks !!! ;-)<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/4 Reinis Rozitis <span dir="ltr"><<a href="mailto:r@roze.lv" target="_blank">r@roze.lv</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
location / {<br>
        rewrite    ^/(.*)/(.*)$      /$1/index.php?url=$2;<br>
   }<br>
</blockquote>
<br></div>
I would suggest to use try_files:<br>
<br>
location / {<br>
       try_files $uri $uri/ /index.php?url=$uri&$args;<br>
}<br>
<br>
<br>
Personally instead of pasing the uri in the 'url' param I like to use try_files $uri $uri/ /index.php?$args; and then in the php code have the url in $_SERVER['REQUEST_URI'] (or $_SERVER['DOCUMENT_URI']) that way there is no possibility to accidentaly mess with the GET variables.<br>


<br>
<br>
rr <br>
______________________________<u></u>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<u></u>mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>