nginx 伪静态排除目录

nginx 伪静态排除目录,如下代码

if (!-e $request_filename) {
    rewrite  ^/(?!index\.php|robots\.txt|Uploads|Public)(.*)$  /index.php?s=$1  last;
    break;
}

这样index.php,robots.txt.Uploads,Public就不会在伪静态内了,可直接访问

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享