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