<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
原文来自: http://stackoverflow.com/a/25211062
转载于:https://www.cnblogs.com/Jim-william/p/5165676.html
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
原文来自: http://stackoverflow.com/a/25211062
转载于:https://www.cnblogs.com/Jim-william/p/5165676.html