今天写捡了个二级目录的博客测试,发现分类和文章全部404,导致无法进入,一番研究探索后,需要在原有的伪静态内添加一下伪静态就可完美解决。
比如:网站为http://www.mipuo.com/software/
location /software/ { 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 (.*) /software/index.php; } }
© 版权声明
THE END