帝国CMS伪静态规则

SJY发表于:2013年01月10日 00:00 • 阅读:

帝国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;
}

 

欢迎转载,但请保留原文地址 http://www.sjyhome.com/empirecms/dg-url-rewrite.html

标签: 标题 静态 信息

回复(0)