IIS8的wordpress discuz伪静态规则

  • A+
所属分类:操作系统 系统运维
输入正文标题广告代码(非移动端)

大家都知道IIS7的静态规则 ,但是对于喜欢尝试新系统的童鞋就不适用了。
现在  我分享一份关于IIS8的静态规则。
首先最基础的

新建web.config文件,添加以下代码,保存后上传到web根目录中
1、wordpress伪静态规则

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><rule name="category"><match url="category/?(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false" /><action type="Rewrite" url="/index.php?category_name={R:1}" appendQueryString="false" logRewrittenUrl="false" /></rule><rule name="tags"><match url="tag/?(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false" /><action type="Rewrite" url="index.php?tag={R:1}" /></rule><rule name="Main Rule" stopProcessing="true"><match url=".*" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php/{R:0}" /></rule><rule name="wordpress" patternSyntax="Wildcard"><match url="*" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false"><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php" /></rule></rules></rewrite></system.webServer></configuration>

2.discuss论坛伪静态规则:

<?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&topic={R:2}&{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&aid={R:2}&page={R:3}&{R:4}" /></rule><rule name="forum_forumdisplay"><match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" /><action type="Rewrite" url="{R:1}/forum.php\?mod=forumdisplay&fid={R:2}&page={R:3}&{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&tid={R:2}&extra=page%3D{R:4}&page={R:3}&{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&fid={R:2}&page={R:3}&{R:4}" /></rule><rule name="home_space"><match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" /><action type="Rewrite" url="{R:1}/home.php\?mod=space&{R:2}={R:3}&{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&uid={R:2}&do=blog&id={R:3}&{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}&value={R:3}&{R:4}" /></rule></rules></rewrite></system.webServer></configuration>
输入正文底部广告代码(非移动端)
输入评论上方广告代码(非移动端)

发表评论

:?::razz::sad::evil::!::smile::oops::grin::eek::shock::???::cool::lol::mad::twisted::roll::wink::idea::arrow::neutral::cry::mrgreen:

目前评论:12   其中:访客  6   博主  0

    • 零夭夭影视 零夭夭影视 5

      非常不错!!!!!!! 零夭夭影视(011823.top)

      • 零夭夭影视 零夭夭影视 5

        非常不错!!!!!!! 零夭夭影视(011823.top)

        • 爆实惠 爆实惠 3

          伪静态是必须的,感谢分享!![给力]

          • 爆实惠 爆实惠 3

            伪静态是必须的,感谢分享!![给力]

            • 江夏离 江夏离 5

              大家好好讨论一下,真不错

              • 江夏离 江夏离 5

                大家好好讨论一下,真不错