帝国cms伪静态Apache的Rewrite设置方法

admin 2024年1月19日11:33:33帝国cms技巧评论1,269 次浏览阅读模式

内容摘要

这篇文章主要为大家介绍了帝国7.0伪静态Apache的Rewrite设置方法,需要的朋友可以参考下代码如下:# 将 RewriteEngine 模式打开RewriteEngine On#信息内容页:showinfo-14-186-

文章正文

这篇文章主要为大家介绍了帝国7.0伪静态Apache的Rewrite设置方法,需要的朋友可以参考下

代码如下:

# 将 RewriteEngine 模式打开

RewriteEngine On

#信息内容页: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>#标题分类列表页: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

以上就是默认的Rewrite规则设置方法。

 

代码注释

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2024年1月19日11:33:33
  • 转载请务必保留本文链接:https://anyun.org/a/webtips/ecmstips/2024/0119/17838.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: