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>