nginx下discuzx 3.2 伪静态设置



















在 nginx下的配置文件nginx.conf添加

location / {
 rewrite ^([^\.] 
*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
 rewrite ^([^\.] *)/article-([0-9] +)-([0-9] 
+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
 rewrite ^([^\.] *)/forum-(\w+)-([0-9] 

+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;

 rewrite ^([^\.] *)/thread-([0-9] +)-([0-9] +)-([0-9] 


+)\.html$ 
$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 
last;
 rewrite ^([^\.] *)/group-([0-9] +)-([0-9] 
+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
 rewrite ^([^\.] 
*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
 rewrite ^([^\.] *)/([a-z] 



+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
 if (!-e $request_filename) {
 return 404;
 }
 }

未经允许不得转载:天宝寺||陈瑞轩 » nginx下discuzx 3.2 伪静态设置

赞 (0) 打赏

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏