nginx 301跳转配置、强制https跳转
#301-START if ($host ~ '^huixx.cn'){ return 301 https://www.huixx.cn$request_uri; } #301-END #HTTP_TO_HTTPS_START if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } #HTTP_TO_HTTPS_END
#301-START if ($host ~ '^huixx.cn'){ return 301 https://www.huixx.cn$request_uri; } #301-END #HTTP_TO_HTTPS_START if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } #HTTP_TO_HTTPS_END