Blinux前几天还在Apache下做Discuz7.2 的伪静态,由于Nginx的性能优势,转向Nginx,再丢个Nginx下的Discuz 7.2 伪静态规则.

在server容器中添加下面这段即可

rewrite ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 last;
rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 last;
rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3 last;
rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 last;
rewrite ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 last;

然后重启nginx

原创文章,转载请注明: 转载自Blinux

原文链接地址: Discuz 7.2 Nginx伪静态

4 Responses to “Discuz 7.2 Nginx伪静态”

  1. 记忆盒子 CHINA Internet Explorer Windows 说:

    你对这个非常的熟悉吧,以后有需要的话,向你请教。:)

    [回复]

  2. jaycn CHINA Internet Explorer Windows 说:

    收藏 。。。o(∩_∩)o...

    [回复]

  3. 短歌行 Mozilla Firefox Windows 说:

    感谢,你可是帮我的在大忙 :mrgreen: http://hd2pt.com

    [回复]

  4. MeeSii CHINA Internet Explorer Windows 说:

    一头雾水,可是还是喜欢看。哈哈~ :mrgreen:

    [回复]

Leave a Reply

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: