问题分类

官网新闻
域名注册问题
虚拟主机问题
VPS主机问题
服务器相关问题
400电话问题
网络营销推广问题
代理系统问题
业界资讯
动态拔号VPS问题
协议及法律条款

当前栏目点击排行

热门点击

Windows2008R2+iis7.5环境下的dz论坛X3版伪静态设置教程

[来源:来自网络] [作者:admin] [日期:2014-05-20]

因为iis7.5集成了url重写,那就就方便多了,首先安装好你的dz论坛之后,那么在你的根目录下(当然有些人也把论坛安装到二级目录)创建一个web.config文件,然后将下面的代码粘贴进去即可。

——————————————————复制以下代码———————————————


<?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>
        </rules>
</rewrite>

        <defaultDocument>
            <files>
                <clear />
                <add value="index.asp" />
                <add value="dufault.html" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
                <add value="index.php" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

——————————————————————复制以上代码————————————————


云立方网产品导航:  动态拨号vps  服务器租用  拨号服务器 

相关文章