apache设置http跳转到https


开通https后如果强制所有连接都使用https可以在相应域名80端口的vhosts下填写如下语句:

     RewriteEngine on
     RewriteCond %{SERVER_PORT} !^443$
     RewriteRule ^(.*)?$ https://%{SERVER_NAME}$1 [L,R]

 

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress