try_files $uri $uri/ /index.php?$args; #去掉index.php location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=/$1 last; } }