Excellent, it worked<br><br>I have another urgent matter on a server live we just switched to<br><br>I need that links like this:<br><a href="http://www.example.com/?v=JYH253CT">http://www.example.com/?v=JYH253CT</a><br><br>

to be rewritten as <a href="http://www.example.com/v.php?dl=JYH253CT">http://www.example.com/v.php?dl=JYH253CT</a><br><br><br>Please help, server is down :(<br><br clear="all">---------------------------------------------------------------<br>

Cristian Rusu<br>Web Developement & Electronic Publishing<br><br>======<br>Crilance.com<br><a href="http://Crilance.blogspot.com">Crilance.blogspot.com</a><br><br>
<br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 10:30 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello!<br>
<div class="im"><br>
On Wed, Nov 28, 2012 at 10:04:58AM +0200, Cristian Rusu wrote:<br>
<br>
> Hello<br>
><br>
> I have urls like <a href="http://example.com/123" target="_blank">example.com/123</a><br>
> I need them rewritten to <a href="http://example.com/?v=123" target="_blank">example.com/?v=123</a><br>
><br>
> However, I want to skip certain directories from rewrite<br>
> eg.<br>
> <a href="http://example.com/status" target="_blank">example.com/status</a><br>
> <a href="http://example.com/admin" target="_blank">example.com/admin</a><br>
><br>
> right now I have this:<br>
><br>
> if (!-e $request_filename){<br>
>     rewrite ^/([A-Za-z0-9-]+)/?$ <a href="http://www.example.com/v.php?dl=$1redirect" target="_blank">http://www.example.com/v.php?dl=$1redirect</a>;<br>
> }<br>
><br>
> Problem is that all urls are rewritten.. how do I put some exceptions?<br>
<br>
</div>I would recommend using location matching to differentiate URIs<br>
which should be handled differently.  E.g.<br>
<br>
    location / {<br>
        # you may want to use try_files here instead<br>
        if (...) {<br>
            rewrite ...<br>
        }<br>
        ...<br>
    }<br>
<br>
    location /status {<br>
        ...<br>
    }<br>
<br>
    location /admin {<br>
        ...<br>
    }<br>
<br>
See <a href="http://nginx.org/r/location" target="_blank">http://nginx.org/r/location</a> for more information.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.com/support.html" target="_blank">http://nginx.com/support.html</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<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" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>