不管是
location /blog/ {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php last;
}
if (!-f $request_filename){
rewrite (.*) /blog/index.php last;
}
}
还是
location /blog/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /blog/index.php$1 last;
}
}
在/etc/nginx/sites-available/default 加上了都不行呀!