帝国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]历史优惠活动内容
猜你可能想看的VPS
- 腾讯云服务器 12 月秒杀 2 核 4G3M998 元 3 年 2 核 全球[VPS测评]
- 真实测评 野草云 5 月香港 CN2+BGP,1H2G20GB SSD,香港VPS[主机]
- Vultr→新用户最高送 103 美元 全球 16 大机房 按小时计费 日本VPS[主机]
- NameCheap→.com $5.88 首年;不限空间虚拟主机 年付 虚拟空间(主机)
- Docker 的八个真实应用场景全球[VPS测评]
- 活动 cloudcone 成立两周年优惠活动 512M 内存方案年付 2全球[VPS测评]
- HostDare→KVM 六五折 CN2 线路 洛杉矶年付 25.99 全球[VPS测评]
- include_once 与 require_once 的区别全球[VPS测评]
- 真实测评 云创网络→1G 内存套餐测评数据 五一促销 年付 6 折优惠 全球[VPS测评]
- 真实测评 九互联→宿迁机房高防超集主机测评数据全球[VPS测评]
- Digital-vm 七折→8 机房 1-10G 端口大流量 KVM 月全球[VPS测评]
- 疯狂猜成语 图猜成语一个人在说话后面还站着两个人是什么成语?全球[VPS测评]
- SpectraIP→€2.5 月 Ryzen 9 1GB 内存 30GB虚拟空间(主机)
- AlphaVPS 黑五 1GB内存 2核CPU 1T流量 免费赠送DA面全球[VPS测评]
- WordPress博客的百度快照怎么快速更新?全球[VPS测评]
- 甲骨文 oracle 免费 vps 添加 ipv6 全自动脚本全球[VPS测评]
- HostyHub-13$ 月 印度 独立IP KVM VPS 4核4G内独立服务器[U]
- hostmental-印度商家 英国伦敦OVH VPS简单踩坑记录全球[VPS测评]
- GreenCloudVPS → 新加坡存储机型 → 2G 500G 全球[VPS测评]
- Wikihost → 香港沙田Gen3 → 1G 10G SSD 5香港VPS[主机]
- 2.45亿、成都公安(大数据基座-服务器)采购:神码、虹信、海康、超聚变全球[VPS测评]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来!全球[VPS测评]
- MoonVM,香港HKT家宽VPS服务器,动态IP一键切换,1G带宽任意香港VPS[主机]
- 什么是云服务器?云服务器怎么登陆?全球[VPS测评]
- 恒星云:高防服务器优惠活动,成都高防云服务器及辽宁香港服务器特惠活动香港VPS[主机]
- HostKvm:韩国香港vps10月份最新促销,海外VPS全场八折优惠韩国VPS[主机]
- 云基:香港/洛杉矶CN2 GIA服务器促销,3750元/月起;欧洲大盘鸡香港VPS[主机]
- 跨境电商周报丨拼多多布局跨境电商平台;Shopify将推出新平台支持网红全球[VPS测评]
- VPS成立BurjeelHoldings全球[VPS测评]
- PQhosting:香港HE/乌克兰/俄罗斯/荷兰/摩尔多瓦vps主机/香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-142529.html











