Nov 30

Discuz FOR IIS7 URL Rewrite 晴

碟舞飞扬 , 23:07 , 服务器类 , 评论(0) , 引用(0) , 阅读(12824) , Via 本站原创 | |
把以下代码复制到网站目录中的配置文件web.config中的 <system.webServer>之后就可以了。
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^archiver/((fid|tid)-[\w\-]+\.html)$" ignoreCase="false" />
                    <action type="Rewrite" url="archiver/index.php?{R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 2">
                    <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="forumdisplay.php?fid={R:1}&page={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3">
                    <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="viewthread.php?tid={R:1}&extra=page\%3D{R:3}&page={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 4">
                    <match url="^space-(username|uid)-(.+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="space.php?{R:1}={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 5">
                    <match url="^tag-(.+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="tag.php?name={R:1}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
Tags: , , ,
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]