星期五, 十二月 19, 2008

rewrite规则,nginx

#enable ucenterHome rewrite
rewrite ^/(space|network)-(.+).html$ /$1.php?rewrite=$2 last;
rewrite ^/(space|network).html$ /$1.php last;
rewrite ^/([0-9]+)$ /space.php?uid=$1 last;

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

3 条评论:

图纸 说...

文章不错呀.我可以转载一下不.

毛虫虫 说...

没问题阿。

yoyoliyang 说...

垃圾评论,囧!!!