【phpwind8.7伪静态】PHPWIND8.7的NGINX伪静态规则

时间:16-09-03 来源: 作者: 点击:

【phpwind8.7伪静态】PHPWIND8.7的NGINX伪静态规则

来源:本站整理  发布时间:2016-09-01  人气:

最新【phpwind8.7伪静态】PHPWIND8.7的NGINX伪静态规则

以下是三零网为大家整理的最新【phpwind8.7伪静态】PHPWIND8.7的NGINX伪静态规则的文章,希望大家能够喜欢!

  •  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;
    }

     


    延伸阅读:

      

    温馨提示:以上内容整理于网络,仅供参考,如果对您有帮助,请收藏本网站!

    上一篇:PHPWind数据结构(非常全)
    下一篇:返回列表

    声明:本文由(Nginx运维与架构)版权所有,禁止转载,文章链接:http://www.nd9p.com/6341.html