帝国CMS伪静态规则

来自:互联网
时间:2018-09-01
阅读:

帝国CMS7.0伪静态

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

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;
}
返回顶部
顶部