這篇文章主要為大家介紹了帝國(guó)7.0偽靜態(tài)Apache的Rewrite設(shè)置方法,需要的朋友可以參考下
代碼如下:
# 將 RewriteEngine 模式打開
RewriteEngine On
#信息內(nèi)容頁:showinfo-14-186-[!–page–].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^showinfo-(.+?)-(.+?)-(.+?).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3</p> <p>#信息列表:listinfo-14-[!–page–].html
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^listinfo-(.+?)-(.+?).html$ /e/action/ListInfo/index.php?classid=$1&page=$2</p> <p>#標(biāo)題分類列表頁:infotype-0-[!–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
以上就是默認(rèn)的Rewrite規(guī)則設(shè)置方法。