location ~* (runtime|application)/{ return 403; } location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s=$1 last; break; } } location ~ ^/(?\d+)$ { try_files $uri $uri/ /index.html; }