帝国cms 全站伪静态规则设置

帝国cms 因为目前来说是免费使用得,而且对于数据承载量以及其他栏目设置方面还是比较友好得,现在大部分网站已经采用帝国cms系统来做了。伪静态相对于静态来说会有更多得好处,今天就说下帝国cms 伪静态规则设置方面得问题

帝国CMS伪静态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;
rewrite ^/sitemap.xml /sitemap.php;
rewrite ^/sitemap-([0-9]+).xml /sitemap.php?classid=$1;
if (!-e $request_filename) {
return 404;
}

上面是帝国CMS默认的nginx伪静态写法,从帝国CMS7.5起,支持Tagsid功能,也就是以前的tagname改成了tagid,让更喜欢id风格的网友满意了,如果你使用tagid,那么你的伪静态规则需要做以下修改:
rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
改成下面这个样子
rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagid=$2&page=$3 last;
最后将修改好的伪静态规则保存到服务器

更多伪静态规则可以查看 玩游网上得设置

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值