apache2将http自动指向https

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


原文来自: http://stackoverflow.com/a/25211062

你可能感兴趣的:(apache2将http自动指向https)