[linux][code]discuz rewrite for nginx[伪静态规则]

2010年9月12日星期日 | | |

discuz 在nginx下的伪静态规则! (ps:discuz的伪静态规则 ,一般情况下是通用的,不必区分是discuz6还是7)

location / {        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;          }

Uchome的在这里

参考:http://www.weijingtai.com/2010/03/27/discuz-rewrite-nginx/

0 评论:


所有文章收集于网络,如果有牵扯到版权问题请与本站站长联系。谢谢合作![email protected]