if (!-e $request_filename) { rewrite ^/update.php(.*)$ /update.php?q=$1 last; rewrite ^/(.*)$ /index.php?q=$1 last; }