ThinkCMF伪静态规则
  • 分类:建站问题
  • 发表:2024-09-04
  • 围观(1,311)
  • 评论(0)

thinkcmf5宝塔liunx版Nginx环境开启伪静态步骤。

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.php?s=$1;
         }
    }
location ~* \/upload\/.+\.(html|php)$ {
return 404;
}
location ~* ^\/plugins\/.+\.(html|php)$ {
return 404;
}
location ~* \/themes\/.+\.(html|php)$ {
return 404;
}
Top