if ($args !~ ^(url|auto)) { rewrite ^(.*)$ http://$server_name/?url=$uri$is_args$args break; } Andrejs Posted at Nginx Forum: http://forum.nginx.org/read.php?2,216459,216481#msg-216481