Having trouble understand how rewrite works

locojohn nginx-forum at nginx.us
Wed Oct 19 16:39:23 UTC 2011


Hi!

Arguments cannot be checked with location directive. Put the below code
into your main server {} block, for example, before declaring any of the
locations:


                if ($request_uri ~ ^/index\.php\?PageID=1$) {
                  rewrite ^ /? permanent;
                }


Andrejs

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



More information about the nginx mailing list