帝国CMS程序Apache/IIS7/Nginx环境下的伪静态规则
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

我们常用的中大型内容网站系统中,帝国CMS可能说是安全性和稳定性比较好的,DEDECMS程序虽然当初比较流行,但是也经常出现漏洞安全。相反帝国CMS的更新频率以及安全性还是被行内较为看好的,虽然在易用性上比DEDECMS稍微不是特别习惯,但是认真使用还是可以的。
蜗牛记忆中(曾经用过),帝国CMS是可以生成静态的,对于伪静态忘记是否有支持,反正在找类似的文章时候看到帝国CMS可以设置伪静态,那就是说伪静态是支持的,这里先把几个常用的Apache/IIS7/Nginx环境下的伪静态规则整理出来,以备以后需要的时候直接使用。
第一、Nginx
rewrite ^([^\\.]*)/listinfo-(.+?)-(.+?)\\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\\.]*)/showinfo-(.+?)-(.+?)-(.+?)\\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\\.]*)/infotype-(.+?)-(.+?)\\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\\.]*)/tags-(.+?)-(.+?)\\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
rewrite ^([^\\.]*)/comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\\.html$ $1/e/pl/index\\.php\\?doaction=$2&classid=$3&id=$4&page=$5&myorder=$6&tempid=$7 last;
if (!-e $request_filename) {
return 404;
}
第二、Apache
RewriteEngine On
ErrorDocument 404 /404.html
Rewritebase /
#信息列表
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^listinfo-(.+?)-(.+?)\\.html$ /e/action/ListInfo/index\\.php\\?classid=$1&page=$2
#信息内容页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^showinfo-(.+?)-(.+?)-(.+?)\\.html$ /e/action/ShowInfo\\.php\\?classid=$1&id=$2&page=$3
#标题分类列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^infotype-(.+?)-(.+?)\\.html$ /e/action/InfoType/index\\.php\\?ttid=$1&page=$2
#TAGS信息列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tags-(.+?)-(.+?)\\.html$ /e/tags/index\\.php\\?tagname=$1&page=$2
#评论列表页
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)\\.html$ /e/pl/index\\.php\\?doaction=$1&classid=$2&id=$3&page=$4&myorder=$5&tempid=$6
第三、IIS7
<?xml version=\”1.0\” encoding=\”UTF-8\”?>
<configuration>
<system.webServer>
<!–帝国7.2默认规则 IIS7的rule name不能重复相同–>
<rewrite>
<rules>
<rule name=\”listinfo\”>
<match url=\”^(.*/)*listinfo-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/ListInfo/index.php\\?classid={R:2}&page={R:3}\” />
</rule>
<rule name=\”showinfo\”>
<match url=\”^(.*/)*showinfo-(.+?)-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/ShowInfo.php\\?classid={R:2}&id={R:3}&page={R:4}\” />
</rule>
<rule name=\”infotype\”>
<match url=\”^(.*/)*infotype-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/action/InfoType/index.php\\?ttid={R:2}&page={R:3}\” />
</rule>
<rule name=\”tags\”>
<match url=\”^(.*/)*tags-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/tags/index.php\\?tagname={R:2}&page={R:3}\” />
</rule>
<rule name=\”comment\”>
<match url=\”^(.*/)*comment-(.+?)-(.+?)-(.+?)-(.+?)-(.+?)-(.+?).html\\?*(.*)$\” />
<action type=\”Rewrite\” url=\”{R:1}/e/pl/index.php\\?doaction={R:2}&={R:3}&={R:4}&page={R:5}&myorder={R:6}&tempid={R:7}\” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
一般我们使用Nginx和Apache环境较多。
猜你可能想看的VPS
- HostEve→$2 月 1GB 内存 20GB SSD 空间 不限流量虚拟空间(主机)
- 口字上面有一个病字是什么成语?全球[VPS测评]
- 优惠 ¥39 月 1G 内存 40G 硬盘 免费 windows 10MWINDOWS
- raksmart 近期促销的日本 cn2 无限流量服务器整理,vps 五独立服务器[U]
- 圣诞优惠 PacificRack→ 2 核 2GB 35GB 2TB 1WINDOWS
- 禁止 layer.msg()在回调时抖动全球[VPS测评]
- KVMLA→香港 日本 新加坡 VPS 年付 7 折 月付 8 折 内存日本VPS[主机]
- Bootstrap-datepicker 设置开始时间及结束时间可选范围全球[VPS测评]
- notepad++设置中文 notepad++如何设置简体中文界面全球[VPS测评]
- 高防服务器 98 美元每月 E3-1270v2 16G 内存 1G 端口全球[VPS测评]
- 七月优惠 ZJI→全新上线 香港云地国际 VDS 七折优惠 所有 VPS香港VPS[主机]
- 阿里云香港服务器测评 稳定高速的香港免备案云服务器 119 元 年香港VPS[主机]
- Pacificrack→$9.89 年 1GB 内存 15GB SSD 虚拟空间(主机)
- XKCDN→亚洲 美国等节点 不限流量 月付 0.99 元;有国内节点美国VPS[主机]
- win10和office激活工具 HEU KMS Activator 集全球[VPS测评]
- zetservers罗马尼亚高防vps,10Gbps带宽/2Tbps高防全球[VPS测评]
- sered 西班牙多IP站群VPS 配置2核2GB起,20个IP起,最高站群服务器[IP]
- AkkoCloud-月付50 季付99 年付299 英国伦敦CN2 GI全球[VPS测评]
- TPE海缆故障通报-完成修复全球[VPS测评]
- 咸鱼云 → 香港 Lite BGP(CDN77) → 月付38元 年付4香港VPS[主机]
- 30个美容院抖音唯美文案,看到就直接拿去发吧全球[VPS测评]
- 六六云,2核2G香港云服务器/1000GB流量/50Mbps端口/KVM香港VPS[主机]
- 宝塔面板在香港服务器安装启动不了nginx怎么办?香港VPS[主机]
- 六六云:美国cera机房CN2 GIA高防/香港CN2 GIA建站/CM美国VPS[主机]
- 老六云怎么样?香港cn2vps月付23元香港NTT月付9.9元香港VPS[主机]
- 紫云服务器怎么样?紫云香港云服务器1核1G2M仅65元/月香港VPS[主机]
- vpsplayer:新年活动_vps全部7.5折起_深圳BGP/美西Ce香港VPS[主机]
- 什么是云服务器?云服务器怎么登陆?全球[VPS测评]
- HTML5绿色有机食品电商网站模板 - Organtio全球[VPS测评]
- 遨游主机:8折优惠,美国cn2 gia vps,54元/月,2G内存/1美国VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-39528.html











