DiscuzX伪静态规则for Nginx

作者:monface 发布时间:May 20, 2010 分类:计算机 1 Comment

DiscuzX已经正式发布了,不知道大家是持观望态度哦,还是马上就升级了.下面把伪静态规则发出来,后台居然就直接有,看来discuzx 很先进嘛.
location / {
        rewrite ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
        rewrite ^(.*)/article-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2 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;
        }

标签: rewrite, nginx, discuzx

仅有一条评论 »

  1. discuzX还没用过呢

添加新评论 »