欢迎访问CMS集中营! 本站QQ交流群:292800309
设为首页  |   加入收藏  |   RSS订阅  |   网站地图
CMS仿站建站技术教程_CMS免费模板源码下载-CMS集中营

PHP |  ThinkPHP |  MYSQL |  DIV+CSS |  JS |  模板

当前位置:首页 > PHPWIND > 正文
推荐文章
相关文章

phpwind 9.X 配置nginx伪静态规则的方法

时间:2015-09-14 09:41:41   作者:烈鹰网络工作室   点击:
1、站点NGINX配置文件添加规则
location /{
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/thread.php?fid=$1 last;
rewrite ^(.*)u/([0-9]+)$ $1u.php?uid=$2 last;
rewrite ^(.*)/bbs.html$ $1/index.php?m=bbs last;
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
rewrite ^(.*)/archiver/fid-([0-9]+).html$ $1/simple/?f$2.html last;
rewrite ^(.*)/archiver/fid-([0-9]+)-page-([0-9]+).html$ $1/simple/?f$2_$3.html last;
rewrite ^(.*)/archiver/tid-([0-9]+).html$ $1/simple/?t$2.html last;
rewrite ^(.*)/archiver/tid-([0-9]+)-page-([0-9]+).html$ $1/simple/?t$2_$3.html last;
rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/thread.php?fid=$2&page=$3 last;
rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/read.php?tid=$2&page=$3 last;
rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/u.php?action=show&$2=$3 last;
rewrite ^(.*)/tag-(.+)\.html$ $1/link.php?action=tag&tagname=$2 last;
rewrite ^(.*)/([0-9]+)$ $1/thread.php?fid=$2&page=1 last;
}


2、登录PHPWIND后台,找到“URL伪静态”

在列表url格式5个可写框后面都加上.html  如论坛帖子列表页修改后为thread-{fid}-{page}.html
 
3、添加完.html之后,选择全选再提交。
TAGS:phpwind nginx 伪静态 规则