apache2将http自动指向https

<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>


原文来自: http://stackoverflow.com/a/25211062
posted @ 2016-01-28 11:45  Waichung  阅读(391)  评论(0编辑  收藏  举报