dedecms的搜索页与tag伪静态

文章转载来自:香港空间


 我们的香港空间是支持伪静态的,提供IIS7下的伪静态脚本如下:

创建一个web.config文件,把文件放到web目录下即可。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1">
                    <match url="^tags.html$" ignoreCase="false" />
                    <action type="Rewrite" url="tags.php" />
                </rule>
                <rule name="Imported Rule 2">
                    <match url="^tag-(.+)-(.+)\/$" ignoreCase="false" />
                    <action type="Rewrite" url="tags\.php?/{R:1}/{R:2}/" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 3">
                    <match url="^(.*)/search/([^/]*)$" ignoreCase="false" />
                    <action type="Rewrite" url="{R:1}/plus/search/.php/?keyword={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 4">
                    <match url="^(.*)/search/([^/]*)/(/d)$" ignoreCase="false" />
                    <action type="Rewrite" url="{R:1}/plus/search/.php/?keyword={R:2}&amp;PageNo={R:3}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

当然,老规矩,为了方便大家,已经做好了一个web.config文档下载,点击下载

dedecms的tag与搜索伪静态.zip