Nginx 设置wordpress 伪静态

参考:https://www.cnblogs.com/wyc89/p/5775882.html

 

location / {
    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;
            }
    }

你可能感兴趣的:(php,nginx,运维)