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伪静态

你对这个非常的熟悉吧,以后有需要的话,向你请教。:)
[回复]
收藏 。。。o(∩_∩)o...
[回复]
感谢,你可是帮我的在大忙
http://hd2pt.com
[回复]
一头雾水,可是还是喜欢看。哈哈~
[回复]