首页 > CMS教程 > 帝国CMS    日期:2018-09-01 / 来自互联网 / 浏览

帝国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 
#信息列表: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

以上就是帝国7.0默认的Rewrite规则,将其放到根目录的.htaccess中即可!

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章

1 2 3 4 5