thinkcmf搭建教程_宝塔环境安装thinkcmf5 开启rewrite伪静态方法

  • Post author:
  • Post category:其他


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

https://blog.csdn.net/sql521hawk/article/details/82958583

1、绑定网站运行目录、

2、填写伪静态规则:

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;

}



版权声明:本文为weixin_34483980原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。