Regex rewrite to root document

etrader nginx-forum at nginx.us
Mon Jan 16 04:35:44 UTC 2012


I have a simple re-write of

rewrite ^/(.*) /post.php?id=$1 last;

This will breaks my main index page, as domain.com will also be
redirected to "post.php?id="

How can I modify my regular expression not to change the main index
page?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,221278,221278#msg-221278



More information about the nginx mailing list