location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } location /PR/ { if (!-e $request_filename){ rewrite ^/PR/(.*)$ /PR/index.php?s=$1 last; } }