新手教程(六)PbootCMS伪静态配置之IIS环境

格展网络
102 浏览32 点赞
PB教程网,一个佛系PbootCMS教程博客,了解一下
PbootCMS在IIS环境下配置伪静态流程
1)安装rewrite组件,如果使用空间一般空间商默认已经安装;
2)到后台配置参数中开启伪静态开关(老版本直接修改程序config/config.php文件url_type=2);

IIS环境

(IIS6的环境自行百度)

1)安装rewrite组件,如果使用空间一般空间商默认已经安装;

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

3)在站点目录建立web.config文件(老版本根目录下默认已有,去除后缀bak即可,新版本到rewrite目录下拷贝规则),

1.X版本规则如下:

#1.X版本使用如下规则:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                 <rule name="reIndex" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

2.X版本规则如下:

<rewrite>
  <rules>
    <rule name="reIndex" stopprocessing="true">
      <match url="^(.*)$" ignoreCase="true" />
      <conditions logicalGrouping="MatchAll">
        <add input="REQUEST_FILENAME" matchType="IsDirectory" negate="true" />
        <add input="REQUEST_FILENAME" matchType="IsFile" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>


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

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

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

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

浏览最多点赞最多文章推荐