ThinkCMF Nginx下配置rewrite问题 伪静态

2019-02-03 11:426548

d0ae4f42444462d507753b19d25ffa95.jpg

放在配置文件的server下

location / {
        index  index.php index.html index.htm;
         if (!-e $request_filename)
         {
            rewrite ^/(.*)$ /index.php?s=$1;
         }
    }
location /api/ {
        index  index.php index.html index.htm;
         if (!-e $request_filename)
         {
            rewrite ^/api/(.*)$ /api/index.php?s=$1;
         }
    }
location ~* \/upload\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/plugins\/.+\.(html|php)$ {
return 404;
}
location ~* \/themes\/.+\.(html|php)$ {
return 404;
}


上一篇: 修改thinkcmf默认发布状态,改为默认发布

下一篇: thinkcmf5显示当前分类以及当前分类下所有子分类文章列表