帝国cms tags 伪静态 linux nginx 配置

在 找到nginx 配置文件,nginx.conf,server 里面加入

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

如下
这里写图片描述

重启服务器就行了,service nginx restart

猜你喜欢

转载自blog.csdn.net/abcde158308/article/details/79729309