nginx将www.foo.bar跳转至foo.bar

我雪指导,不听不行!

新建server段监听www.xuchen.wang发来的请求,永久跳转:

server {
    listen 80;
    server_name www.xuchen.wang;
    rewrite ^(.*) http://xuchen.wang$1 permanent;
}

此处评论已关闭