AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] 求助 301问题 我想让bbs跟不带www全部跳转到www上 |
|
---|---|
hidemad |
hidemad 发表于 2014-04-18 11:56:56
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; } if ($host != 'xxx.com) { rewrite ^/(.*)$ http://www.xxx.com/$1 permanent; } 这样的无效 是哪里出错了
点赞,加油! (0分)
2014-04-18 11:56:56 1
|
ulmate01 |
回复
2014-04-19 11:31:51 2
|
amysql |
回复
2014-04-20 13:34:55 3
AMH面板 - 好用高效低占用、安全可靠极稳定 |