Set a particular location for address starting with '?'
mvip
nginx-forum at nginx.us
Thu Sep 24 03:38:27 MSD 2009
I think I've tried all different approaches for this, but here is the problem: I need to separate all URLs starting with '/?' from the remaining ones (eg /?p=12).
I've tried a bunch of different regex matches, but none of them seems to be able to match URLs starting with a '?'. I already started a thread here (http://forum.nginx.org/read.php?11,8435), but Jim referred me over to the mailing list.
Configuration options I've tried includes:
'location ^~ \?.* { proxy_pass http://blog.foobar.com;}' and
'location ~ /\?.* { proxy_pass http://blog.foobar.com;}'
The above regexes should match the request, but for some reason they don't. Could anyone please provide me with a solution here?
Ps. Kudos to the deveopers for developing a great webserver. Compared to Apache the configuration syntax is both easier to read and write. Ds.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,8769,8769#msg-8769
More information about the nginx
mailing list