帝国CMS伪静态规则说明
htaccess伪静态规则
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 |
RewriteEngine On ErrorDocument 404 /404.php Rewritebase / #信息内容页 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid= $1 &id= $2 &page= $3 [NC,L] #信息列表 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid= $1 &page= $2 [NC,L] #标题分类列表页 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid= $1 &page= $2 [NC,L] #TAGS信息列表页 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^tags-(etagid[0-9]+)-([0-9]+).html$ /e/tags/index.php?tagname= $1 &page= $2 [NC,L] #评论列表页 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/pl/index.php?doaction= $1 &classid= $2 &id= $3 &page= $4 &myorder= $5 &tempid= $6 [NC,L] #栏目自定义伪静态 默认添加.html 后缀更多的后缀自行添加 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/|ad/|ebak/|web/|m2/|api) RewriteRule ^([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid= $1 &page= $2 [NC,L] #内容自定义伪静态 默认添加.html 后缀更多的后缀自行添加 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/|ad|ebak/|web/|m2/|api) RewriteRule ^([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid= $1 &id= $2 &page= $3 [NC,L] |
Nginx.conf伪静态规则
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 |
rewrite ^/showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid= $1 &id= $2 &page= $3 last; rewrite ^/listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid= $1 &page= $2 last; rewrite ^/infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid= $1 &page= $2 last; rewrite ^/tags-(etagid[0-9]+)-([0-9]+).html$ /e/tags/index.php?tagname= $1 &page= $2 last; rewrite ^/comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-(.+?).html$ /e/pl/index.php?doaction= $1 &classid= $2 &id= $3 &page= $4 &myorder= $5 &tempid= $6 last; if (!-f $request_filename ){ set $rule_0 1 $rule_0 ; } if ( $request_uri !~ "^(/d/|/e/|/html/|/images/|/s/|/search/|/skin/|/t/|/ad/)" ){ set $rule_0 2 $rule_0 ; } if ( $rule_0 = "21" ){ rewrite ^/([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid= $1 &page= $2 last; rewrite ^/([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid= $1 &id= $2 &page= $3 last; } if (!-e $request_filename ) { return 404; } |
web.config伪静态规则
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 |
<?xml version= "1.0" encoding= "UTF-8" ?> <configuration> <system.webServer> <httpErrors errorMode= "DetailedLocalOnly" > <remove statusCode= "404" /> <error statusCode= "404" path= "/404.php" responseMode= "ExecuteURL" /> </httpErrors> <rewrite> <rules> <rule name= "规则 1" stopProcessing= "true" > <match url= "^showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> </conditions> <action type= "Rewrite" url= "/e/action/ShowInfo.php?classid={R:1}&id={R:2}&page={R:3}" appendQueryString= "false" /> </rule> <rule name= "规则 2" stopProcessing= "true" > <match url= "^listinfo-([0-9]+)-([0-9]+).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> </conditions> <action type= "Rewrite" url= "/e/action/ListInfo/index.php?classid={R:1}&page={R:2}" appendQueryString= "false" /> </rule> <rule name= "规则 3" stopProcessing= "true" > <match url= "^infotype-([0-9]+)-([0-9]+).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> </conditions> <action type= "Rewrite" url= "/e/action/InfoType/index.php?ttid={R:1}&page={R:2}" appendQueryString= "false" /> </rule> <rule name= "规则 4" stopProcessing= "true" > <match url= "^tags-(etagid[0-9]+)-([0-9]+).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> </conditions> <action type= "Rewrite" url= "/e/tags/index.php?tagname={R:1}&page={R:2}" appendQueryString= "false" /> </rule> <rule name= "规则 5" stopProcessing= "true" > <match url= "^comment-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> </conditions> <action type= "Rewrite" url= "/e/pl/index.php?doaction={R:1}&classid={R:2}&id={R:3}&page={R:4}&myorder={R:5}&tempid={R:6}" appendQueryString= "false" /> </rule> <rule name= "规则 6" stopProcessing= "true" > <match url= "^([0-9a-zA-Z-/]+)/(|index.html|index_[0-9]+.html)$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> <add input= "{REQUEST_FILENAME}" matchType= "IsFile" ignoreCase= "false" negate= "true" /> <add input= "{R:1}" pattern= "^(d/|e/|html/|images/|s/|search/|skin/|t/|ad/|ebak/|web/|m2/|api)" ignoreCase= "false" negate= "true" /> </conditions> <action type= "Rewrite" url= "/e/action/list.php?classid={R:1}&page={R:2}" appendQueryString= "false" /> </rule> <rule name= "规则 7" stopProcessing= "true" > <match url= "^([0-9a-zA-Z-/]+)/([0-9a-zA-Z]+)([_0-9]*).html$" /> <conditions logicalGrouping= "MatchAll" > <add input= "{QUERY_STRING}" pattern= "^(.*)$" ignoreCase= "false" /> <add input= "{REQUEST_FILENAME}" matchType= "IsFile" ignoreCase= "false" negate= "true" /> <add input= "{R:1}" pattern= "^(d/|e/|html/|images/|s/|search/|skin/|t/|ad|ebak/|web/|m2/|api)" ignoreCase= "false" negate= "true" /> </conditions> <action type= "Rewrite" url= "/e/action/show.php?classid={R:1}&id={R:2}&page={R:3}" appendQueryString= "false" /> </rule> </rules> </rewrite> <httpRedirect enabled= "false" /> </system.webServer> </configuration> |
本网声明:海南科技网发布此文仅出于信息分享,并非赞同其观点或证实其描述,不承担侵权行为的连带责任。投资者据此操作,风险自担。版权归原作者所有,如涉版权或来源标注有误,请联系我们删除。本网原创内容未经书面授权,任何单位或个人不得转载和摘编。
猜您喜欢
-
帝国cms标签内容页获取时间的方法
帝国cms标签内容页获取时间的方法:<meta property="article:published_time" content="<?=date('c',查看全文>>- 建站经验
海南科技网
-
帝国cms内容页调用所在的专题信息带链接
[e:loop={'select ztid from phome_enewsztinfo where classid='.$navinfor[classid].' and id='.$na查看全文>>- 建站经验
海南科技网
-
帝国WAP内容页如何调用与PC一样的内容newstext
<?=DoWapRepNewstext($r[newstext])?>用了这个字段 会把P标签都给清除<?=$r[newstext]?>试了这个还是查看全文>>- 建站经验
海南科技网
- 浅谈帝国cms的分页采集正则及过滤技巧
- 帝国cms标签内容页获取时间的方法
- 帝国cms内容页调用所在的专题信息带链接
- 帝国WAP内容页如何调用与PC一样的内容newstext
- 帝国cms内容页如何调用指定相关栏目下的文章?
- 帝国cms如何给后台左侧终极栏目添加发布文章快速按钮?
- 帝国cms 列表静态和动态分页样式在哪里修改?
- 灵动标签调用栏目最新10条信息自动获取帝国cms表前缀的方法
- 帝国缩略图随机和自动生成并使用id加序号命名防止重复的方法
- 帝国cms获取当前栏目、父栏目ID、名称、别名、链接调用方法