lnmp.sh下WordPress如何去掉indexphp

rwrite重写设置伪静态即可

# WordPress伪静态for nginx
if (-f $request_filename/index.html){
    rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
    rewrite (.*) /index.php;
}

发表评论

seven + one =