千家信息网

帝国7.0伪静态Apache的Rewrite如何设置

发表于:2025-02-14 作者:千家信息网编辑
千家信息网最后更新 2025年02月14日,这篇文章将为大家详细讲解有关帝国7.0伪静态Apache的Rewrite如何设置,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。代码如下:# 将 RewriteEng
千家信息网最后更新 2025年02月14日帝国7.0伪静态Apache的Rewrite如何设置

这篇文章将为大家详细讲解有关帝国7.0伪静态Apache的Rewrite如何设置,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

代码如下:

# 将 RewriteEngine 模式打开RewriteEngine On#信息内容页:showinfo-[!--classid--]-[!--id--]-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^showinfo-(.+?)-(.+?)-(.+?).html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3

#信息列表:listinfo-[!--classid--]-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^listinfo-(.+?)-(.+?).html$ /e/action/ListInfo/index.php?classid=$1&page=$2

#标题分类列表页:infotype-[!--ttid--]-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^infotype-(.+?)-(.+?).html$ /e/action/InfoType/index.php?ttid=$1&page=$2

#TAGS信息列表页:tags-[!--tagname--]-[!--page--].htmlRewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^tags-(.+?)-(.+?).html$ /e/tags/index.php?tagname=$1&page=$2

关于帝国7.0伪静态Apache的Rewrite如何设置就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

0