一、增加nginx.conf配置即可
server{ listen 80; server_name a.123.com; rewrite ^/(.*)$ https://a.123.com:443/$1 permanent; }
二、#解决http二级域名跳转https,解决http根域名跳转https
server { listen 80; server_name test.com; if ($host != 'www.test.com') { rewrite ^/(.*)$ https://www.test.com/$1 permanent; } } server { listen 80; server_name www.test.com; rewrite ^/(.*)$ https://www.test.com/$1 permanent; }
文章评论