Yes, this worked, I was also trying to get an idea of that matching in my attempt...<br><br>Why is $1 not matching right?<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 2:58 PM, Antonio P.P. Almeida <span dir="ltr"><<a href="mailto:appa@perusio.net" target="_blank">appa@perusio.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">> On Wed, Nov 28, 2012 at 2:25 PM, Edho Arief <<a href="mailto:edho@myconan.net">edho@myconan.net</a>> wrote:<br>
><br>
>> On Wed, Nov 28, 2012 at 7:11 PM, Cristian Rusu <<a href="mailto:crirus@gmail.com">crirus@gmail.com</a>> wrote:<br>
>> > 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" target="_blank">http://www.example.com/?v=JYH253CT</a><br>
>> ><br>
>> > to be rewritten as <a href="http://www.example.com/v.php?dl=JYH253CT" target="_blank">http://www.example.com/v.php?dl=JYH253CT</a><br>
>> ><br>
>> ><br>
>> > Please help, server is down :(<br>
>> ><br>
>><br>
>> <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#variables" target="_blank">http://nginx.org/en/docs/http/ngx_http_core_module.html#variables</a><br>
>><br>
>> Maybe something like this.<br>
>><br>
>> location = / {<br>
>> if ($arg_v) {<br>
>> rewrite ^ /v.php?dl=$arg_v;<br>
>> }<br>
>> }<br>
>><br>
><br>
> I tried this from a htaccess to nginx converter<br>
><br>
> if ($query_string ~ "^v=(.*)$"){<br>
> rewrite ^/index\.php$ /v.php?dl=$1 break;<br>
> }<br>
<br>
</div></div>Try:<br>
<br>
if ($arg_v) {<br>
rewrite ^ /v.php?dl=$arg_v break;<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--appa<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>