server { listen 80; server_name www.xxxx.com; if ($host = "www.xxxx.com"){ return 301 https://www.xxxx.com$request_uri; } } ...
server { listen 80; server_name www.xxxx.com; if ($host = "www.xxxx.com"){ return 301 https://www.xxxx.com$request_uri; } }