dedecms织梦全站伪静态设置+全套伪静态规则(2)

</form>


伪静态规则
懒人包已经打包了iis6、iis7、8、apache、nginx的规则文件
下面再写一下各规则

iis6伪静态规则 httpd.ini

#列表页和列表分页

RewriteRule ^(.*)/plus/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2

RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4

#内容页和内容分页

RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3

#TAG标签伪静态规则

RewriteRule ^(.*)/tags\.html $1/tags\.php [I]

RewriteRule ^(.*)/tags/(.*)(?:(\?.*))* $1/tags\.php\?\/$2 [I]

RewriteRule ^(.*)/tags/(.*)\/(?:(\?.*))* $1/tags\.php\?\/$2\/ [I]

RewriteRule ^(.*)/tags/(.*)\/([0-9])(?:(\?.*))* $1/tags\.php\?\/$2\/$3 [I]

RewriteRule ^(.*)/tags/(.*)\/([0-9])\/(?:(\?.*))* $1/tags\.php\?\/$2\/$3\/ [I]

#搜索页

RewriteRule ^(.*)/search/(.*)-([0-9]+)\.html  $1/plus/search.php?q=$2&PageNo=$3&pagesize=2&searchtype=title

RewriteRule ^(.*)/search/(.*)\.html  $1/plus/search.php?q=$2&pagesize=2&searchtype=title


iis7、8伪静态规则 web.config

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <rule name="首页">

                    <match url="^index.html$" ignoreCase="false" />

                    <action type="Rewrite" url="index.php" appendQueryString="false" />

                </rule>

                <rule name="列表">

                    <match url="^plus/list-([0-9]+).html$" ignoreCase="false" />

                    <action type="Rewrite" url="/plus/list.php?tid={R:1}" appendQueryString="false" />

                </rule>

                <rule name="列表分页">

                    <match url="^plus/list-([0-9]+)-([0-9]+)-([0-9]+).html$" ignoreCase="false" />

                    <action type="Rewrite" url="/plus/list.php?tid={R:1}&amp;totalresult={R:2}&amp;PageNo={R:3}" appendQueryString="false" />

                </rule>

                <rule name="文章分页">

                    <match url="^plus/view-([0-9]+)-([0-9]+).html$" ignoreCase="false" />

                    <action type="Rewrite" url="/plus/view.php?aid={R:1}&amp;pageno={R:2}" appendQueryString="false" />

                </rule>

<rule name="tag首页">

<match url="^tags.html$" ignoreCase="false" />

<action type="Rewrite" url="tags.php" appendQueryString="false" />

</rule>

<rule name="tag列表">

<match url="^tags/(.*)(?:(\?.*))*$" ignoreCase="false" />

<action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" />

</rule>

<rule name="tag列表最后有左斜杠">

<match url="^tags/(.*)/(?:(\?.*))*$" ignoreCase="false" />

<action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />

</rule>

<rule name="tag列表分页">

<match url="^tags/(.*)/([0-9])(?:(\?.*))*$" ignoreCase="false" />

<action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />

</rule>

<rule name="tag列表分页最后有左斜杠">

<match url="^tags/(.*)/([0-9])/(?:(\?.*))*$" ignoreCase="false" />

<action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" />

</rule>

<rule name="搜索页分页">

                    <match url="^search/(.*)-([0-9]+).html$" ignoreCase="false" />

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/c7c6d9a09e49295005be67a9c621c545.html