帝国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
- 云创网络→55.2 元 月 512MB 内存 10GB SSD 空间 1虚拟空间(主机)
- HawkHost→$5 月 Cloud-1GB 20G SSD 1TB 全球[VPS测评]
- 6yun→45 元 月 256MB 内存 5GB 空间 2TB 流量 1虚拟空间(主机)
- ¥27 月 256M 内存 10G 硬盘 512G 1Gbps KVM 全球[VPS测评]
- CloudCone - 洛杉矶 KVM 五折促销 512M 内存 1T 全球[VPS测评]
- 修罗云→9 元 月 256MB 内存 11GB 空间 150GB 流量 虚拟空间(主机)
- PHP 随机生成 N 个汉字 PHP 随机生成一段汉字全球[VPS测评]
- MoeCloud→25 元 月特价机补货 CN2 GIA 线路 可以看奈全球[VPS测评]
- 疯狂猜成语 图猜成语一个大的逆字和一个小的首字是什么成语?全球[VPS测评]
- 超值推荐腾讯云秒杀→2 核 CPU 4G 内存 50G 硬盘 6M 带宽全球[VPS测评]
- bash: scp: command not found 错误解决办法全球[VPS测评]
- Debian 10 如何启用 BBR 加速全球[VPS测评]
- PIGYun香港/韩国/美国高端优化线路,优惠后最低月付14元起,可选香韩国VPS[主机]
- 宝塔面板一键搭建hellohao图床教程全球[VPS测评]
- Sharktech洛杉矶高防服务器,E5双核/1TB NVMe/不限流量全球[VPS测评]
- Confiared → 7$月付 玻利维亚 2C0.5G15G硬盘 10全球[VPS测评]
- ISPlevel-乌克兰商家KVM SSD VPS 11.11 折扣|所全球[VPS测评]
- 2020情人节: CloudCone 512 内存 10G HDD 1T全球[VPS测评]
- [谨慎]Tsukearu → 年付半价免初装费的日本小鸡 → 年付 ¥3日本VPS[主机]
- 潮科技|阿里云发布第七代高主频云服务器ECS和含光800云服务器全球[VPS测评]
- 2022年有哪些顶级托管服务提供商全球[VPS测评]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- 奇异互动,2核4G香港云服务器仅655元/年,注册领550元新手大礼包香港VPS[主机]
- kvmcloud怎么样?香港BGP云服务器 月付12.9元香港VPS[主机]
- 又有美议员窜访台,中国驻美大使馆:“中方将对美国的挑衅采取果断的反制措施美国VPS[主机]
- 企鹅小屋:1核/512MB/10GB SSD空间/500GB流量/KVM虚拟空间(主机)
- 为什么大家都选择香港服务器建站香港VPS[主机]
- HostKVM香港云地VPS,2核4G内存折后$8.4/月,30M大带宽香港VPS[主机]
- 实例 GIA0910629396 重启失败,原因:sudo: unabl全球[VPS测评]
- 什么是IconFont ?iconfont 的使用和解析全球[VPS测评]
转载请注明原文地址:http://www.motoll.com/read-142529.html