IIS7 或 IIS7.5的用户 如果需要使用伪静态功能,首先你要确定你已经安装了url重写功能,如果没有安装请下载安装,下载地址 https://www.iis.net/downloads/microsoft/url-rewrite 安装好后,将网站根目录的web.config里面的内容换成。- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <defaultDocument>
- <files>
- <add value="index.php" />
- </files>
- </defaultDocument>
- <rewrite>
- <rules>
- <rule name="OrgPage" stopProcessing="true">
- <match url="^(.*)[ DISCUZ_CODE_0 ]quot; />
- <conditions logicalGrouping="MatchAll">
- <add input="{HTTP_HOST}" pattern="^(.*)[ DISCUZ_CODE_0 ]quot; />
- <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
- <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
- </conditions>
- <action type="Rewrite" url="index.php?s={R:1}" />
- </rule>
- </rules>
- </rewrite>
- </system.webServer>
- </configuration>
|