帝国7.0伪静态Apache的Rewrite设置方法

帝国7.0伪静态Apache的Rewrite设置方法

来源:帝国CMS模板网 作者:帝国CMS教程 时间:2014-07-10
浏览:4.5千+ 收藏 点赞(19)
简介: 这篇文章主要为大家介绍了帝国7.0伪静态Apache的Rewrite设置方法,需要的朋友可以参考下代码如下:# 将 RewriteEngine 模式打开RewriteEngine On#信息内容页:showinfo!clasid]

这篇文章主要为大家介绍了帝国7.0伪静态Apache的Rewrite设置方法,需要的朋友可以参考下

代码如下:

# 将 RewriteEngine 模式打开

RewriteEngine On

#信息内容页:showinfo-[!--classid--]-[!--id--]-[!--page--].html

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^showinfo-(.+?)-(.+?)-(.+?).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3</p> <p>#信息列表:listinfo-[!--classid--]-[!--page--].html

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^listinfo-(.+?)-(.+?).html$ /e/action/ListInfo/index.php?classid=$1&page=$2</p> <p>#标题分类列表页:infotype-[!--ttid--]-[!--page--].html

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^infotype-(.+?)-(.+?).html$ /e/action/InfoType/index.php?ttid=$1&page=$2</p> <p>#TAGS信息列表页:tags-[!--tagname--]-[!--page--].html

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^tags-(.+?)-(.+?).html$ /e/tags/index.php?tagname=$1&page=$2

以上就是默认的Rewrite规则设置方法。

帝国CMS模板网 帝国CMS模板网(www.daixiao360.cn)长期承接帝国CMS模板定制,帝国CMS仿站,帝国CMS采集规则,帝国CMS插件,帝国CMS二次开发。