http强制跳转https

http强制跳转https可增加搜索引擎对网站的友好度,对SEO有好处
 
方法:
1.域名申请好https证书
 
2.根目录建立.htaccess文件(以Linux系统的apache环境为例子)。内容如下

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
隐藏