Godaddy iis7 win主机 Discuz! X1伪静态设置

Godaddy iis7 win主机 Discuz! X1伪静态设置

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&amp;topic={R:1}" />
                </rule>
                <rule name="article">
                    <match url="article-([0-9]+)\.html$" />
                    <action type="Rewrite" url="portal.php?mod=view&amp;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&amp;fid={R:1}&amp;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&amp;tid={R:1}&amp;extra=page={R:2}&amp;page={R:3}" />
                </rule>
                <rule name="group">
                    <match url="^group-([0-9]+)-([0-9]+)\.html$" />
                    <action type="Rewrite" url="forum.php?mod=group&amp;fid={R:1}&amp;page={R:2}" />
                </rule>
                <rule name="space">
                    <match url="^space-(username|uid)-(.+)\.html$" />
                    <action type="Rewrite" url="home.php?mod=space&amp;{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>

dinghui.org

关注虚拟化及IT技术发展!