nginx中wordpress伪静态规则写法
以前是在apache下使用wordpress当时写使用了一些伪静态页面,后来换到了nginx中发现apache的伪静态规则在nginx中使用不了,百度了一下发现他们写法上有点区别,下面我们一起来看看.
规则代码如下:
location / { index index.html index.php; 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; } }查看更多关于nginx中wordpress伪静态规则写法 - WordPress的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did8551