这里,如果是单次重定向用 redirect, 如果永久跳转用 permanent,这里用 permanent
{
listen 80;
server_name xxx.com www.xxx.com;
index index.html index.php;
root /data/www/wwwroot;
if ($http_host !~ "^www.xxx.com$") {
rewrite ^(.*) http://www.xxx.com$1 permanent;
}
........................
}
posted @ 2013-01-09 23:08 noneisnull 阅读(12891) 评论(1) 收藏 举报















浙公网安备 33010602011771号