nginx配置http访问指向到https
19-04-20 22:12
服务器
小白
http指向https http https
把不带www的域名指向到带www的域名
if ($host = 'baiyongj.com') { rewrite ^/(.*)$ https://www.baiyongj.com/$1 permanent; }
配置http指向到https,把每个URL都指向到https
if ($server_port = 80) { return 301 https://$server_name$request_uri; } if ($scheme = http) { return 301 https://$server_name$request_uri; } error_page 497 https://$server_name$request_uri;
本文为原创文章,转载无需和我联系,但请注明来自:http://www.baiyongj.com/news/468.html