thinkcmf5宝塔liunx版Nginx环境开启伪静态步骤。
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;
}

3、保存,OK!

本文详细介绍了在宝塔Linux环境下,使用Nginx为ThinkCMF5框架配置伪静态的方法,包括绑定运行目录及具体规则设置。
855

被折叠的 条评论
为什么被折叠?



