新手教程(七)PbootCMS伪静态配置之Apache环境

格展网络
101 浏览32 点赞
PB教程网,一个佛系PbootCMS教程博客,了解一下
Apache环境
1)开启Apache重写模块,具体请百度,如果使用空间一般空间商默认已经开启;
2)到后台配置参数中开启伪静态开关(老版本直接修改程序config/config.php文件url_type=2);
3)在站点目录建立.htaccess文件(老版本根目录下默认已有,新版本到rewrite目录下拷贝规则),内容如下:

Apache环境

1)开启Apache重写模块,具体请百度,如果使用空间一般空间商默认已经开启;

2)到后台配置参数中开启伪静态开关(老版本直接修改程序config/config.php文件url_type=2);

3)在站点目录建立.htaccess文件(老版本根目录下默认已有,新版本到rewrite目录下拷贝规则)

1.X版本规则如下:

#1.X版本使用如下规则:
<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  
  #如果页面出现"No input file specified." 请注释第一条,启用第二条
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
  #RewriteRule ^(.*)$ index.php [E=PATH_INFO:$1,QSA,PT,L]  
  
</IfModule>

2.X版本规则如下:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  #如果页面出现"No input file specified." 请注释第一条,启用第二条
  RewriteRule ^(.*)$ index.php/$1 [QSA,pT,L]
  #RewriteRule ^(.*)$ index.php [E=PATH_INFO:$1,QSA,PT,L]
</IfModule>


本文由平台注册作者或者官方发布,未经许可,禁止转载!

本文网址:https://www.yingzia.com

本文来自:@格展网络 | 发布于 2020-06-17 08:57:06

原文来自:https://www.yingzia.com

点赞 | 32 浏览 | 101 分享
浏览最多点赞最多文章推荐