PbootCMS Nginx环境
1、到后台配置参数中开启伪静态;
2、在nginx虚拟主机location配置中添加规则(Nginx 不会自动写入,请从源码包 rewrite/nginx.txt 拷贝),规则如下:
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?p=$1 last;
}
}
location ~ ^/(data|static/backup)/ {
deny all;
}
注意:Nginx中如果站点部署在二级目录,请对应修改重写规则, 如:二级目录为test则:rewrite ^/test/(.*)$ /test/index.php?p=$1 last;

更新时间:2026-10-09 13:05:06