Godaddy Windows主机安装discuz7.2实现伪静态前文已经提供过了,最近升级到了Discuz X1,现提供如下web.config给有需要的人,直接放在论坛安装的目录下即可。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="topic">
<match url="^topic-(.+)\.html$" />
<action type="Rewrite" url="portal.php?mod=topic&topic={R:1}" />
</rule>
<rule name="article">
<match url="article-([0-9]+)\.html$" />
<action type="Rewrite" url="portal.php?mod=view&aid={R:1}" />
</rule>
<rule name="forum">
<match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
<action type="Rewrite" url="forum.php?mod=forumdisplay&fid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="thread">
<match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" />
<action type="Rewrite" url="forum.php?mod=viewthread&tid={R:1}&extra=page={R:2}&page={R:3}" />
</rule>
<rule name="group">
<match url="^group-([0-9]+)-([0-9]+)\.html$" />
<action type="Rewrite" url="forum.php?mod=group&fid={R:1}&page={R:2}" />
</rule>
<rule name="space">
<match url="^space-(username|uid)-(.+)\.html$" />
<action type="Rewrite" url="home.php?mod=space&{R:1}={R:2}" />
</rule>
<rule name="Xrewrite">
<match url="^([a-z]+)-(.+)\.html$" />
<action type="Rewrite" url="{R:1}.php?rewrite={R:2}" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
<system.web>
<customErrors mode="Off" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
</system.web>
</configuration>
发表评论