nginx URL隐藏index.php

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;
}
}

猜你喜欢

转载自www.cnblogs.com/fanhuo/p/9419476.html