活动:一次性充值满500元,云服务器、虚拟主机产品8折特惠! 全国免费咨询热线:℡ 400-9918-136
帮助和公告

感谢您的关注,我们一直致力于为您提供放心、满意的服务。

优惠活动香港云服务器,免备案在线开通,预装宝塔(bt)面板,独享10M带宽,赠送DDOS防护,免费技术支持,代理低至6折,仅需48元/月!
返回首页

Discuz!X3 Windows系统 IIS 7 伪静态规则

信息来源:亿速互联修改时间:2018/4/20 16:14:26

将以下代码复制保存为 web.config,上传到网站根目录即可生效。

请注意:只适用与IIS7或以上版本,IIS6并不支持。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
  <rewrite>
   <rules>
    <rule name="portal_topic">
     <match url="^(.*/)*topic-(.+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/portal.php?mod=topic&amp;topic={R:2}&amp;{R:3}" />
    </rule>
    <rule name="portal_article">
     <match url="^(.*/)*article-([0-9]+)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/portal.php?mod=view&amp;aid={R:2}&amp;page={R:3}&amp;{R:4}" />
    </rule>
    <rule name="forum_forumdisplay">
     <match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/forum.php?mod=forumdisplay&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
    </rule>
    <rule name="forum_viewthread">
     <match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/forum.php?mod=viewthread&amp;tid={R:2}&amp;extra=page%3D{R:4}&amp;page={R:3}&amp;{R:5}" />
    </rule>
    <rule name="group_group">
     <match url="^(.*/)*group-([0-9]+)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/forum.php?mod=group&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
    </rule>
    <rule name="home_space">
     <match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/home.php?mod=space&amp;{R:2}={R:3}&amp;{R:4}" />
    </rule>
    <rule name="home_blog">
     <match url="^(.*/)*blog-([0-9]+)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/home.php?mod=space&amp;uid={R:2}&amp;do=blog&amp;id={R:3}&amp;{R:4}" />
    </rule>
    <rule name="forum_archiver">
     <match url="^(.*/)*(fid|tid)-([0-9]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/index.php?action={R:2}&amp;value={R:3}&amp;{R:4}" />
    </rule>
    <rule name="plugin">
     <match url="^(.*/)*([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+).html\?*(.*)$" />
     <action type="Rewrite" url="{R:1}/plugin.php?id={R:2}:{R:3}&amp;{R:4}" />
    </rule>
   </rules>
  </rewrite>
</system.webServer>
</configuration>


以下为最近更新的内容