点击登录
  • 欢迎访问无限星辰技术博客,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏无限星辰吧
  • 好集导航开张了,传送门:好集导航

帝国7.0在nginx下面的伪静态规则

帝国CMS知识库 crx349 7092次浏览 0个评论 扫描二维码

rewrite ^([^\.]*)/listinfo-([0-9]+)-([0-9]+)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;
rewrite ^([^\.]*)/showinfo-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;
rewrite ^([^\.]*)/infotype-([0-9]+)-([0-9]+)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;
rewrite ^([^\.]*)/tags-(.+?)-([0-9]+)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;
if (!-e $request_filename) {
return 404;
}

帝国7.0可用的伪静态规则

附加
apache:

# 将 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


无限星辰 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明帝国7.0在nginx下面的伪静态规则!
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!