帝国CMS提议立即转化成静态数据页,但有时也的确期待伪静态,这儿以帝国CMS7.0为例子。PHP云虚拟主机下设定伪静态:

1、确定室内空间适用伪静态,一些室内空间商的室内空间是必须手动式打开伪静态作用的。

2、后台管理--系统软件--系统配置--伪静态基本参数,设定好伪静态标准。

3、在建.htaccess文档,放到网址根目录下。

.htaccess文档中载入以下标准:(留意标准文档中的标准要与后台管理设定的一致)

#将RewriteEngine方式开启

RewriteEngineOn

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

RewriteCond%{QUERY_STRING}^(.*)$

RewriteRule^showinfo-(.+?)-(.+?)-(.+?)/.html$/e/action/ShowInfo.php?classid=$1&id=$2&page=$3

#信息内容目录:listinfo-[!--classid--]-[!--page--].html

RewriteCond%{QUERY_STRING}^(.*)$

RewriteRule^listinfo-(.+?)-(.+?)/.html$/e/action/ListInfo/index.php?classid=$1&page=$2

#题目归类目录页:infotype-[!--ttid--]-[!--page--].html

RewriteCond%{QUERY_STRING}^(.*)$

RewriteRule^infotype-(.+?)-(.+?)/.html$/e/action/InfoType/index.php?ttid=$1&page=$2

#TAGS信息内容目录页:tags-[!--tagname--]-[!--page--].html

RewriteCond%{QUERY_STRING}^(.*)$

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


未经允许不得转载! 作者:访客,转载或复制请以超链接形式并注明出处x36交易网

原文地址:https://www.x36.cn/post/2228.html发布于:2020-07-09