Sheldon Xu

强制Apache使用HTTPS

如果你想让你的用户访问你的webapp时只使用安全的HTTPS协议,而不是没加密过的HTTP协议,可以这样配置Apache:

<Virtualhost *:80>里面加入如下内容:

RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]


然后重启Apache, done!

posted on 2012-09-24 14:19  Sheldon Xu  阅读(5378)  评论(0编辑  收藏  举报

导航