rewrite query string

Thomas Seifert thomas-lists at mysnip.de
Mon May 12 17:26:12 MSD 2008


Hi Igor,

thanks for your reply.
Actually I'd need both :).
The problem with the built in rewrite module seems to be that it can't 
rewrite the request arguments (?f=something), only the raw uri (I could 
rewrite foo.php to bar.php for example).

Any ideas how to rewrite the query string part?


Regards,

thomas


Igor Clark schrieb:
> Hi Thomas, I'm not clear whether you want to do this as a server-side 
> rewrite or just redirect the browser, but either way 
> http://wiki.codemongers.com/NginxHttpRewriteModule might help.
>
> cheers
> i
>
> On 12 May 2008, at 10:44, Thomas Seifert wrote:
>
>> Hey folks,
>>
>> I simply can't figure out how to rewrite the query string in nginx.
>> I need to turn urls like foo.php?f=111 into foo.php?111 and similar 
>> things.
>> From reading past messages in the lists it seems like I can only 
>> match on query string with the "if" but
>> there's no way to rewrite the query string itself.
>> Is that still correct? No workaround available?
>>
>>
>> Thanks in advance,
>>
>> thomas
>>
>
> -- 
> Igor Clark • POKE • 10 Redchurch Street • E2 7DD • +44 (0)20 7749 5355 
> • www.pokelondon.com
>
>
>
>






More information about the nginx mailing list