智慧建站平台,千套网站模板,免费随心选!

您现在的位置: 首页>>网站教程

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

来源: 发布时间:2019-12-02热度:303 ℃
帝国cms7.0提供了伪静态的设置,本文就帝国7.0下伪静态apache的rewrite设置方法简述如下:代码如下:# 将 RewriteEngine 模式打开RewriteEngine On#信息内···

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

帝国cms7.0提供了伪静态的设置,本文就帝国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
登录后复制

本文地址:http://ezhuoer.com