帝国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环境较多。
[帝国CMS伪静态]历史优惠活动内容
猜你可能想看的VPS
- Uovz→3500 元 年 L5630*2 8GB 内存 146GB S全球[VPS测评]
- JQuery 获取选中 option 的自定义属性的方法全球[VPS测评]
- AnyueHost→1200 元 月 E3-1265LV3 8GB 内存日本VPS[主机]
- 老薛主机 2020 开工大吉 主机全场年付 6.5 折全球[VPS测评]
- Laravel 框架 Warning: require(.. vendo全球[VPS测评]
- FastCache→有香港直连节点 100GB 通用流量包 18.8 元香港VPS[主机]
- HostUp→$3.5 月 2GB 内存 25GB SSD 空间 1TB虚拟空间(主机)
- 疯狂猜成语 图猜成语四个回字一个增字在照镜子还有一颗红心是什么成语?全球[VPS测评]
- Chrome 浏览器开发者工具中引入网络 js 文件进行测试的方法全球[VPS测评]
- 狗云 VPS:五大 CN2 GIA 直连数据中心 圣何塞 CN2 GIA全球[VPS测评]
- PacificRack便宜VPS促销 2核4G/50G纯SSD硬盘/2个全球[VPS测评]
- RackNerd洛杉矶高防VPS 1G内存/18G硬盘/1Gbps/60全球[VPS测评]
- V5 Server香港阿里云/荃湾服务器新客户首单七折终身优惠月付最低3香港VPS[主机]
- 如何使用对象存储进行Chia奇亚币云挖矿?全球[VPS测评]
- Alwyzon 便宜奥地利VPS 大硬盘存储VPS九折促销 512M内全球[VPS测评]
- Corehosting 荷兰VPS测试 6欧 半年 1Gbps@1T全球[VPS测评]
- vultr-各区下载测试地址 测试IP全球[VPS测评]
- DMIT.io 香港VPS CVM N3系列香港VPS[主机]
- 免备案服务器对权重和网站排名有影响吗?全球[VPS测评]
- 云服务器和服务器各有什么优缺点?全球[VPS测评]
- Bloggar-移动端友好的新闻博客类HTML5模板全球[VPS测评]
- 云服务器能干什么?有几十种玩法?阿里云,腾讯云服务器如何购买?全球[VPS测评]
- JGKVM促销,美国cn2vps服务器价格再创新低,平均6.5元/月起美国VPS[主机]
- 奇维云优惠活动:香港CN21核1G1M带宽云服务器免费领取香港VPS[主机]
- 蓝队云服务器怎么样?蓝队云服务器价格和优势是什么?全球[VPS测评]
- DMIT:香港/洛杉矶GIA等KVM VPS,黑五DMIT优惠码活动,稳香港VPS[主机]
- 跨境贸易和跨境电商的三大区别简单分析全球[VPS测评]
- 什么是云计算?全球[VPS测评]
- 美云香港云服务器怎么样?1核1G香港云服务器价格99元/月香港VPS[主机]
- 水墨云:2021年特惠活动_IPLC专线/海外CN2/香港/日本/韩国/日本VPS[主机]
转载请注明原文地址:http://www.motoll.com/read-39528.html