PHPIN.NET

 找回密码
 立即注册
查看: 10843|回复: 0

[其他] 帝国CMS默认伪静态规则提供[7.0|7.2|7.5]

[复制链接]

469

主题

31

回帖

5569

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
5569
发表于 2014-2-22 17:07:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
帝国cms7.2测试版默认伪静态规则提供
本文关键字词:帝国cms伪静态,帝国伪静态,帝国伪静态规则,iis7伪静态规则

暂时只有APACHE IIS6 IIS7的规则,其他规则自行对照修改即可。不是很严谨,自己可以往严谨中修改:仅供参考!


apache下的.htaccess:
  1. RewriteEngine On
  2. ErrorDocument 404 /404.html
  3. Rewritebase /
  4. #信息列表
  5. RewriteCond %{QUERY_STRING} ^(.*)$
  6. RewriteRule ^listinfo-(.+?)-(.+?)\.html$ /e/action/ListInfo/index\.php\?classid=$1&page=$2
  7. #信息内容页
  8. RewriteCond %{QUERY_STRING} ^(.*)$
  9. RewriteRule ^showinfo-(.+?)-(.+?)-(.+?)\.html$ /e/action/ShowInfo\.php\?classid=$1&id=$2&page=$3
  10. #标题分类列表页
  11. RewriteCond %{QUERY_STRING} ^(.*)$
  12. RewriteRule ^infotype-(.+?)-(.+?)\.html$ /e/action/InfoType/index\.php\?ttid=$1&page=$2
  13. #TAGS信息列表页
  14. RewriteCond %{QUERY_STRING} ^(.*)$
  15. RewriteRule ^tags-(.+?)-(.+?)\.html$ /e/tags/index\.php\?tagname=$1&page=$2
  16. #评论列表页
  17. RewriteCond %{QUERY_STRING} ^(.*)$
  18. RewriteRule ^comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).htmlnbsp; /e/pl/index\.php\?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6
  19. #搜索伪静态
复制代码


IIS6下的httpd.ini:
  1. [ISAPI_Rewrite]
  2. # 3600 = 1 hour
  3. CacheClockRate 3600
  4. RepeatLimit 32
  5. #信息列表
  6. RewriteRule ^(.*)listinfo-(.+?)-(.+?)\.html$ $1/e/action/ListInfo/index\.php\?classid=$2&page=$3
  7. #信息内容页
  8. RewriteRule ^(.*)showinfo-(.+?)-(.+?)-(.+?)\.html$ $1/e/action/ShowInfo\.php\?classid=$2&id=$3&page=$4
  9. #标题分类列表页
  10. RewriteRule ^(.*)infotype-(.+?)-(.+?)\.html$ $1/e/action/InfoType/index\.php\?ttid=$2&page=$3
  11. #TAGS信息列表页
  12. RewriteRule ^(.*)tags-(.+?)-(.+?)\.html$ $1/e/tags/index\.php\?tagname=$2&page=$3
  13. #评论列表页
  14. RewriteRule ^(.*)comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).htmlnbsp; $1/e/pl/index\.php\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7
  15. #搜索伪静态
复制代码


IIS7下的web.config:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <!--帝国7.2默认规则 IIS7的rule name不能重复相同-->
  5. <rewrite>
  6. <rules>
  7. <rule name="listinfo">
  8. <match url="^(.*/)*listinfo-(.+?)-(.+?).html\?*(.*)[        DISCUZ_CODE_2        ]quot; />
  9. <action type="Rewrite" url="{R:1}/e/action/ListInfo/index.php\?classid={R:2}&amp;page={R:3}" />
  10. </rule>
  11. <rule name="showinfo">
  12. <match url="^(.*/)*showinfo-(.+?)-(.+?)-(.+?).html\?*(.*)[        DISCUZ_CODE_2        ]quot; />
  13. <action type="Rewrite" url="{R:1}/e/action/ShowInfo.php\?classid={R:2}&amp;id={R:3}&amp;page={R:4}" />
  14. </rule>
  15. <rule name="infotype">
  16. <match url="^(.*/)*infotype-(.+?)-(.+?).html\?*(.*)[        DISCUZ_CODE_2        ]quot; />
  17. <action type="Rewrite" url="{R:1}/e/action/InfoType/index.php\?ttid={R:2}&amp;page={R:3}" />
  18. </rule>
  19. <rule name="tags">
  20. <match url="^(.*/)*tags-(.+?)-(.+?).html\?*(.*)[        DISCUZ_CODE_2        ]quot; />
  21. <action type="Rewrite" url="{R:1}/e/tags/index.php\?tagname={R:2}&amp;page={R:3}" />
  22. </rule>
  23. <rule name="comment">
  24. <match url="^(.*/)*comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html\?*(.*)[        DISCUZ_CODE_2        ]quot; />
  25. <action type="Rewrite" url="{R:1}/e/pl/index.php\?doaction={R:2}&amp;={R:3}&amp;={R:4}&amp;page={R:5}&amp;myorder={R:6}&amp;tempid={R:7}" />
  26. </rule>
  27. </rules>
  28. </rewrite>
  29. </system.webServer>  
  30. </configuration>
复制代码


Nginx下伪静态:
  1. rewrite ^([^\.]*)/listinfo-(.+?)-(.+?)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
  2. rewrite ^([^\.]*)/showinfo-(.+?)-(.+?)-(.+?)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
  3. rewrite ^([^\.]*)/infotype-(.+?)-(.+?)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
  4. rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
  5. rewrite ^([^\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\.htmlnbsp; $1/e/pl/index\.php\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
  6. if (!-e $request_filename) {
  7. return 404;
  8. }
复制代码


规则未做严谨处理 仅供参考,其他规则请自行修改。

伪静态规则.rar (1.8 KB, 下载次数: 11)

帝国CMS7.5版本
Apache:
  1. RewriteEngine On
  2. Rewritebase /
  3. #信息内容页
  4. RewriteCond %{QUERY_STRING} ^(.*)$
  5. RewriteRule ^showinfo-([0-9]+)-([0-9]+)-([0-9]+).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3 [NC,L]
  6. #信息列表
  7. RewriteCond %{QUERY_STRING} ^(.*)$
  8. RewriteRule ^listinfo-([0-9]+)-([0-9]+).html$ /e/action/ListInfo/index.php?classid=$1&page=$2 [NC,L]
  9. #标题分类列表页
  10. RewriteCond %{QUERY_STRING} ^(.*)$
  11. RewriteRule ^infotype-([0-9]+)-([0-9]+).html$ /e/action/InfoType/index.php?ttid=$1&page=$2 [NC,L]
  12. #TAGS信息列表页
  13. RewriteCond %{QUERY_STRING} ^(.*)$
  14. RewriteRule ^tags-(.+?)-([0-9]+).html$ /e/tags/index.php?tagname=$1&page=$2 [NC,L]
  15. #评论列表页
  16. RewriteCond %{QUERY_STRING} ^(.*)$
  17. 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]
复制代码


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|PHPIN.NET ( 冀ICP备12000898号-14 )|网站地图

GMT+8, 2024-12-4 00:49

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表