格展网络

PbootCms内页无法正常访问的情况 链接伪静态Nginx环境怎么弄

PbootCms内页无法正常访问的情况 链接伪静态Nginx环境 

Nginx环境

1、到后台配置参数中开启伪静态;

2、在nginx虚拟主机location配置中添加规则,规则如下:

#1.X版本使用如下规则:location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php/$1 last;  }}
#2.X+版本使用如下规则:location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?p=$1 last;  }}


按照步骤弄过了 还是您访问的页面不存在,请核对后重试!



2022年09月13日 | 135人阅读
回答 | 1
  • #请复制下面伪静态配置到nginx配置文件中:

    #规则适合PbootCMS V2.0+版本


    location / {

    if (!-e $request_filename){

    rewrite ^/(.*)$ /index.php?p=$1 last;

    }

    }


    2022年09月13日

游客

^-^我来说两句,请先 登录
发表回答