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

                    <action type="Rewrite" url="/plus/search.php?q={R:1}&amp;PageNo={R:2}&amp;pagesize=2&amp;searchtype=title" appendQueryString="false" />

                </rule>

<rule name="搜索页">

                    <match url="^search/(.*).html$" ignoreCase="false" />

                    <action type="Rewrite" url="/plus/search.php?q={R:1}&amp;pagesize=2&amp;searchtype=title" appendQueryString="false" />

                </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>


apache伪静态规则 .htaccess

#列表页和列表分页

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

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

#内容页和内容分页

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

#TAG标签

RewriteRule ^tags\.html$ tags\.php

RewriteRule ^tags/(.*)(?:(\?.*))* tags\.php\?\/$1

RewriteRule ^tags/(.*)\/(?:(\?.*))*  tags\.php\?\/$1\/

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

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

#搜索页

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

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


nginx伪静态规则

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

rewrite ^/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3;

rewrite ^/plus/view-([0-9]+)-1\.html$ /plus/view.php?arcID=$1;

rewrite ^/plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?aid=$1&pageno=$2;

rewrite ^/tags\.html$ /tags.php;

rewrite ^/tags/(.*)(?:(\?.*))* /tags.php?/$1;

rewrite ^/tags/(.*)/(?:(\?.*))*  /tags.php?/$1/;

rewrite ^/tags/(.*)/([0-9])(?:(\?.*))* /tags.php?/$1/$2;

rewrite ^/tags/(.*)/([0-9])/(?:(\?.*))*  /tags.php?/$1/$2/;

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

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

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

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