Published on

Nginx 301 重定向

Authors
  • avatar
    Name
    duluwa.com
    Twitter
#REWRITE-START
if ($host ~ '^www.xxx.net'){
    return 301 https://www.xxx.com$request_uri;
}

if ($host ~ '^xxx.net'){
    return 301 https://www.xxx.com$request_uri;
}
#REWRITE-END