帝国cms伪静态规则(帝国cms 开启动态)
Imperial CMS建议直接生成静态页面,但有时我们确实需要伪静态页面。这里我们以Imperial CMS 7.0为例。 PHP虚拟主机下设置伪静态:
1.确认空间支持伪静态。部分空间商需要手动开启伪静态功能。
2.后台--系统--系统设置--伪静态参数设置,设置伪静态规则。
3. 新建一个.htaccess文件,并将其放置在网站根目录下。
在.htaccess文件中写入如下规则:(注意规则文件中的规则必须与后台设置的一致)
# 开启RewriteEngine模式RewriteEngine On #信息内容页: showinfo-3-12158-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.* )$RewriteRule ^showinfo-(.+?)-(.+?)-(.+?)/.html$ /e/action/ShowInfo.php?classid=$1id=$2page=$3#信息列表:listinfo -3-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^listinfo-(.+?)-(.+?)/.html$/e/action/ListInfo/index.php?classid=$1page=$2#标题分类列表页:infotype-0-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(. *)$RewriteRule ^infotype-(.+?)-(.+?)/.html$ /e/action/InfoType/index.php?ttid=$1page=$2#TAGS信息列表页:tags-[!- -tagname--]-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^tags-(.+?)-(.+?)/.html$ /e/tags/index.php?tagname=$1page=$2