
帝国CMS发起直接死成静态页,但有时候也确实希望伪静态,这里以 帝国CMS7.0为例。PHP虚拟主机下设置伪静态:
1、确认空间支持伪静态,有些空间商的空间是需要脚动开启伪静态功能的。
2、后台--系统--系统设置--伪静态参数设置,设置好伪静态规则。
3、新建 .htaccess 文件,放正在网站根目录下。
.htaccess文件中写入如下规则:(注意规则文件中的规则要与后台设置的同等)
# 将 RewriteEngine 模式翻开
RewriteEngine On
#信息内容页:showinfo-[!--classid--]-[!--id--]-[!--page--].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^showinfo-(.+?)-(.+?)-(.+?)/.html$ /e/action/ShowInfo.php?classid=&id=&page=
#信息列表:listinfo-[!--classid--]-[!--page--].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^listinfo-(.+?)-(.+?)/.html$ /e/action/ListInfo/index.php?classid=&page=
#标题分类列表页:infotype-[!--ttid--]-[!--page--].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^infotype-(.+?)-(.+?)/.html$ /e/action/InfoType/index.php?ttid=&page=
#TAGS信息列表页:tags-[!--tagname--]-[!--page--].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tags-(.+?)-(.+?)/.html$ /e/tags/index.php?tagname=&page=
转载请注明: 帝国CMS模板 » 帝国CMS虚拟主机伪静态设置.htaccess
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
