location / {
???????????????# First attempt to serve request as file, then
???????????????# as directory, then fall back to displaying a 404.
???????????????try_files $uri $uri/ =404;
???????????????if (!-e $request_filename){
???????????????????????rewrite ^(.*)$ /index.php?q=$1 last;
???????????????????????break;
???????????????}
???????}
nginx URL隐藏index.php
原文地址:https://www.cnblogs.com/fanhuo/p/9419476.html