帝国cms ngix后php打不开,帝国cms伪静态规则(Apache+Nginx)

有客的网站是帝国cms建立的,帝国cms伪静态规则,对于使用动态链接的朋友,效果非常好,可以缩短网站链接,更好的做网站排名优化。

将下面的内容复制到nginx或者apache的伪静态文件内,就可以在帝国cms后台开启伪静态访问了,开启之后,如果有历史记录,你还需要刷新下网站URL才可以。

7b8b30336fd596afe3fb452df49c7fb1.png

Apache下伪静态

#首页伪静态

RewriteRule ^index\.html$ index.php

#信息列表页

RewriteRule ^listinfo-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/ListInfo/index.php?classid=$1&page=$2

#信息内容页

RewriteRule ^showinfo-([0-9]{1,})-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3

#标题分类列表页

RewriteRule ^infotype-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/InfoType/index.php?ttid=$1&page=$2

#TAGS信息列表页

RewriteRule ^tags-([0-9]{1,})-([0-9]{1,})\.html$  /e/tags/index.php?tagname=$1&page=$2

c5c8671f7f0e023e32b59292b24cf4b6.png

Nginx下伪静态

rewrite ^([^\.]*)/listinfo-([0-9]+)-([0-9]+)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;

rewrite ^([^\.]*)/showinfo-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;

rewrite ^([^\.]*)/infotype-([0-9]+)-([0-9]+)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;

rewrite ^([^\.]*)/tags-(.+?)-([0-9]+)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;

if (!-e $request_filename) {

return 404;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值