Loading
0

织梦CMS伪静态规则大全,Apache伪静态,DEDECMS IIS伪静态,Nginx伪静态
被墙跳转TG:@qianhenetwork QQ 851617266

301免备案跳转微信公众号
腾讯云服务器大促销。
华为服务器

前言:DEDECMS(织梦CMS)是最流行的CMS之一,但织梦cms的伪静态不太好调试,本教程整理了常见的织梦伪静态,比如织梦cms手机站伪静态,织梦CMS Apache伪静态,dedecms程序Nginx伪静态规则,IIS web.config伪静态规则,以及tag伪静态及手机二级目录下伪静态规则等,希望对大家有帮助。
快速达到
1、织梦CMS程序Nginx伪静态规则
2、织梦CMS程序Apache伪静态规则
3、织梦CMS程序IIS(web.config)伪静态规则
4、织梦CMS程序httpd.ini危机感规则
 
织梦CMS在Apache下设置伪静态方法(附Apache伪静态规则):https://www.zfcdn.xyz/showinfo-18-35784-0.html
织梦CMS在nginx下设置伪静态方法(附nginx伪静态规则):https://www.zfcdn.xyz/showinfo-18-35783-0.html
织梦CMS程序Nginx下危伪静态
1、#织梦CMS程序Nginx下通用规则1

rewrite "^/list-([0-9]+)\.html$" /plus/list.php?tid=$1 last;
rewrite "^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/view-([0-9]+)-1\.html$" /plus/view.php?arcID=$1 last;
rewrite "^/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/plus/list-([0-9]+)\.html$" /plus/list.php?tid=$1 last;
rewrite "^/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/plus/view-([0-9]+)-1\.html$" /plus/view.php?arcID=$1 last;
rewrite "^/plus/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/tags.html$" /tags.php last;
rewrite "^/tag-([0-9]+)-([0-9]+)\.html$" /tags.php?/$1/$2/ last;

2、织梦cms伪静态nginx伪静态规则2

location / {
rewrite "^/index.html$" /index.php last;
rewrite "^/list-([0-9]+)\.html$" /plus/list.php?tid=$1 last;
rewrite "^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 last;
rewrite "^/view-([0-9]+)-1\.html$" /plus/view.php?arcID=$1 last;
rewrite "^/view-([0-9]+)-([0-9]+)\.html$" /plus/view.php?aid=$1&pageno=$2 last;
rewrite "^/tags/$" /tags.php last;
rewrite "^/tags/(.*)/$" /tags.php?/$1/ last;
break;
}

3、织梦cms伪静态nginx伪静态规则3

location / {
#dedecms电脑端目录结构nginx伪静态
#首页
rewrite ^/index\.html$ /index.php;
#TAG标签
rewrite ^/tags\.html$/tags.php;
rewrite ^/tags/([0-9]+)\.html$/tags.php?\/$1;
rewrite ^/tags/([0-9]+)\.html$/tags.php?\/$1\/;
rewrite ^/tags/([0-9]+)_([0-9]+)\.html$ /tags.php?\/$1\/$2;
rewrite ^/tags/([0-9]+)_([0-9]+)\.html$  /tags.php?\/$1\/$2\/;
#列表栏目
rewrite ^/(.*)/$ /plus/list.php?tid=$1;
#列表栏目分页
rewrite ^/(.*)/list_([0-9]+)_([0-9]+)\.html$ /plus/list.php?tid=$1&PageNo=$2;
#文章页
rewrite ^/(.*)/([0-9]+)\.html$ /plus/view.php?aid=$1;
#文章页分页
rewrite ^/(.*)/([0-9]+)_([0-9]+)\.html$ /plus/view.php?aid=$1&pageno=$2;
#搜索页
rewrite ^/search/(.*)-([0-9]+)\.html$  /plus/search.php?q=$1&PageNo=$2&pagesize=10&searchtype=title;
rewrite ^/search/(.*)\.html$  /plus/search.php?q=$1&pagesize=10&searchtype=title;
}

4、织梦cms伪静态nginx伪静态规则4

rewrite ^/tags\.html$ /tags.php;
rewrite ^/tags/(.*)-([0-9]+)\.html$  /tags.php?\/$1\/$2;
rewrite ^/tags/(.*)\.html$  /tags.php?\/$1;
rewrite ^/kexueshangwang/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/fund/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/futures/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/rmb/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/gainiangu/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/stock/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/jinrijinjia/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/gupiaorumen/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/shenghuo/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/haocihaoju/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/waihuinews/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/yule/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/qumingwang/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/banklilv/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/daikuanlilv/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/licai/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/hotview/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/edu/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/guojiazhengce/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/ylxw/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/gold/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/jinrizixun/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/xinyongka/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/mingxing/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/xmdq/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/gupiaozhishi/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/english/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/fangjia/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/zhufuyu/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/hetong/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/zhougongjiemeng/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/lsmw/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/edu/daxue/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/rmb/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/jpy/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/hkd/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/twd/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/rmbeur/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/rmbaud/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/rmbthb/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/huilv/usdrmb/([0-9]+)/([0-9]+)/([0-9]+)\.html$ /plus/view.php?aid=$3;
rewrite ^/(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php last;


织梦程序Apache伪静态规则
1、规则1

RewriteRule ^"^/list-([0-9]+)\.html$" plus/list.php?tid=$1
RewriteRule ^"^/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$" plus/list.php?tid=$1&totalresult=$2&PageNo=$3
RewriteRule ^"^/view-([0-9]+)-1\.html$" plus/view.php?arcID=$1
RewriteRule ^"^/view-([0-9]+)-([0-9]+)\.html$" plus/view.php?aid=$1&pageno=$2
RewriteRule ^"^/tags.html$" tags.php
RewriteRule ^"^/tag-([0-9]+)-([0-9]+)\.html$" tags.php?/$1/$2

2、规则2

#dedecms电脑端目录结构apache伪静态
RewriteEngine On
RewriteBase /
#首页
RewriteRule ^index\.html$ index\.php
#TAG标签
RewriteRule ^tags\.html$    tags\.php
RewriteRule ^tags/([0-9]+)\.html$    tags\.php\?\/$1 [L]
RewriteRule ^tags/([0-9]+)\.html$    tags\.php\?\/$1\/
RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$    tags\.php\?\/$1\/$2
RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$    tags\.php\?\/$1\/$2\/
#列表栏目
RewriteRule ^(.*)/$ /plus/list.php?tid=$1
#列表栏目分页
RewriteRule ^(.*)/list_([0-9]+)_([0-9]+)\.html$ /plus/list.php?tid=$2&PageNo=$3
#文章页
RewriteRule ^(.*)/([0-9]+)\.html$ /plus/view.php?aid=$2
#文章页分页
RewriteRule ^(.*)/([0-9]+)_([0-9]+)\.html$ /plus/view.php?aid=$2&pageno=$3
#搜索页
RewriteRule ^search/(.*)-([0-9]+)\.html$  /plus/search.php?q=$1&PageNo=$2&pagesize=10&searchtype=title
RewriteRule ^search/(.*)\.html$  /plus/search.php?q=$1&pagesize=10&searchtype=title

3、规则3

 #Apache伪静态
RewriteEngine On
#RewriteRule ^index.html /index.php
#dede5.7列表页伪静态规则
#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]+)-1.html$ /plus/view.php?arcID=$1
#文章页伪静态规则
#RewriteRule ^plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?aid=$1&pageno=$2


织梦cms程序IIS7/IIS8/IIS10web.config伪静态规则
1、IIS规则1

<?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="tag首页">
                    <match url="^tags.html$" ignoreCase="false" />
                    <action type="Rewrite" url="tags.php" appendQueryString="false" />
                </rule>
                <rule name="tag列表">
                    <match url="^tags/([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" />
                </rule>
                <rule name="tag列表最后有左斜杠">
                    <match url="^tags/([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />
                </rule>
                <rule name="tag列表分页">
                    <match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />
                </rule>
                <rule name="tag列表分页最后有左斜杠">
                    <match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" />
                </rule>
                <rule name="列表">
                    <match url="^(.*)/$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/list.php?tid={R:1}" appendQueryString="false" />
                </rule>
                <rule name="列表分页">
                    <match url="^(.*)/list_([0-9]+)_([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/list.php?tid={R:2}&amp;PageNo={R:3}" appendQueryString="false" />
                </rule>
                <rule name="文章页">
                    <match url="^(.*)/([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/view.php?aid={R:2}" appendQueryString="false" />
                </rule>
                <rule name="文章分页">
                    <match url="^(.*)/([0-9]+)_([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/view.php?aid={R:2}&amp;pageno={R:3}" appendQueryString="false" />
                </rule>
                <rule name="搜索页分页">
                    <match url="^search/(.*)-([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite"
                        url="/plus/search.php?q={R:1}&amp;PageNo={R:2}&amp;pagesize=10&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=10&amp;searchtype=title"
                        appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

2、规则2

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="已导入的规则 1">
                    <match url="^list-([0-9]+).html$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/list.php?tid={R:1}" appendQueryString="false" />
                </rule>
                <rule name="已导入的规则 2">
                    <match url="^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="已导入的规则 3">
                    <match url="^view-([0-9]+)-1.html$" ignoreCase="false" />
                    <action type="Rewrite" url="/plus/view.php?arcID={R:1}" appendQueryString="false" />
                </rule>
                <rule name="已导入的规则 4">
                    <match url="^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>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>


httpd.ini伪静态规则

#首页伪静态规则,如果不使用动态首页,请勿必删除这一行,否则打开首页会出现死循环
RewriteRule ^(.*)/index\.html $1/index\.php [I]
#列表页伪静态规则
RewriteRule ^(.*)/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2 [I]
RewriteRule ^(.*)/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4 [I]
#文章页伪静态规则
RewriteRule ^(.*)/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3 [I]
#搜索伪静态规则
RewriteRule ^(.*)/search\.html(?:(\?.*))* $1/search\.php?$2 [I]
#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]
#问答伪静态规则,适用于DedeCmsV5.3-5.6版本,需要修改几处程序
RewriteRule ^(.*)/post\.html $1/post\.php [I]
RewriteRule ^(.*)/type\.html $1/type\.php [I]
RewriteRule ^(.*)/question-([0-9]+)\.html $1/question\.php\?id=$2 [I]
RewriteRule ^(.*)/browser-1-([0-9]+)\.html $1/browser\.php\?tid=$2 [I]
RewriteRule ^(.*)/browser-2-([0-9]+)\.html $1/browser\.php\?tid2=$2 [I]
RewriteRule ^(.*)/browser-1-([0-9]+)-([0-9]+)\.html $1/browser\.php\?tid=$2&page=$3 [I]
RewriteRule ^(.*)/browser-2-([0-9]+)-([0-9]+)\.html $1/browser\.php\?tid2=$2&page=$3 [I]
RewriteRule ^(.*)/browser-([0-9]+)\.html $1/browser\.php\?lm=$2 [I]
RewriteRule ^(.*)/browser-1-([0-9]+)-([0-9]+)\.html $1/browser\.php\?tid=$2&lm=$3 [I]
RewriteRule ^(.*)/browser-2-([0-9]+)-([0-9]+)\.html $1/browser\.php\?tid2=$2&lm=$3 [I]







 
301免备案跳转微信公众号
华为服务器
腾讯云服务器大促销。

声明:站长码字很辛苦啊,转载时请保留本声明及附带文章链接:https://www.zfcdn.xyz/showinfo-18-36201-0.html
亲爱的:被墙域名跳转TG:@qianhenetwork QQ:851617266,可否收藏+评论+分享呢?
上一篇:解决织梦CMS生成报错Allowed memory size of /include/helpers/string.helper.php on line 121方法
下一篇:返回列表