Possible rewrite regular expression bug?

Roxis roxis at list.ru
Mon Jun 23 13:44:34 MSD 2008


On Monday 23 June 2008, Peter Hoang wrote:
> Hi all,
>
> I'm trying to migrate our server from Lighttpd. Everything has been
> going smoothly until I have this problem with regular expression. I
> suspect this is a bug with NGINX regular expression. Consider the
> following RE:
>
> rewrite ^(.*)&__Q=([^\-]+)-([^/]*)$ /j?$2=$3 last;
>
> This RE matches urls like http://localhost/testing&__Q=q-test but not
> http://localhost/t?testing&__Q=q-test. It looks like this RE only
> matches urls which don't contain '?' character before '__Q' part.
>
> Has anyone run into this problem before?
>
> Cheers,
> Peter

nginx ignores (like apache) query_string in rewrite rules





More information about the nginx mailing list