帝国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
- Laravel faker 生成中文测试数据全球[VPS测评]
- centerhop→优质新加坡 VPS $27 年 1g 内存 25gSWINDOWS
- JGKVM→CN2 GIA 线路即将涨价 三月收尾活动 1 核 512M全球[VPS测评]
- IMIDC→$4 月 KVM-512MB 20GB 500GB 香港&台日本VPS[主机]
- 促销 virmach→特价套餐购买两年送一年 三年只需要 30 美元全球[VPS测评]
- tudcloud→“五一” 香港不限流量 VPS 一律 7 折优惠 三网香港VPS[主机]
- ThinkPHP5.1 中使用 phpqrcode 生成二维码全球[VPS测评]
- jquery 打印插件 jqprint.js 使用教程全球[VPS测评]
- DedeCMS 去掉后台登录页面广告的办法全球[VPS测评]
- 疯狂猜成语 图猜成语五个口字每个里面都有个碑字是什么成语?全球[VPS测评]
- 哪些国外VPS商家可以支付宝付款?全球[VPS测评]
- WordPress 修改管理页面登录地址全球[VPS测评]
- Debian 10 如何启用 BBR 加速全球[VPS测评]
- 搬瓦工VPS主机IP被封原因及应对方法全球[VPS测评]
- HostCram 美国便宜 LXC VPS主机测评,达拉斯机房,三网直连美国VPS[主机]
- servertrafficweb-乌克兰 11欧元 月 1G内存20G硬WINDOWS
- Linux chown -R 指令介绍与使用全球[VPS测评]
- 世界杯季疫情突发,跨境电商订单排队,义乌商人面临难题全球[VPS测评]
- WordPress去掉分类链接中category目录的两种方法全球[VPS测评]
- 硅云服务器拼团活动:香港云服务器1核1G,拼团价仅98元/年香港VPS[主机]
- 全球云lovps,香港CN2线路vps 新品七折月付49元香港VPS[主机]
- 麻花云怎么样?安徽移动vps月付29元/香港vps月付21元香港VPS[主机]
- 网站迁移服务器是如何运作的?新手站长看完这篇文章,很容易就能看完。全球[VPS测评]
- HostXen:双十一新用户香港、日本vps,送20元代金券,充值300日本VPS[主机]
- 阿里云香港服务器价格优惠:老用户香港2核4G3M云服务器仅1181.5元香港VPS[主机]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里?全球[VPS测评]
- 吸血鬼崛起服务器怎么快速搭建?全球[VPS测评]
- 伏羲云:全场75折,美国CN2 GIA/香港CN2年付硬盘翻倍,日本软银日本VPS[主机]
- 绮风云:香港云服务器仅11元/月,132元/年;美国/日本/韩国/新加坡日本VPS[主机]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里?全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-39528.html











