When using Apache with SSL you may want to force all Visitors to use HTTPS instead of HTTP.
After configuring Apache for SSL you can achieve this by using this VirtualHost definition:
<VirtualHost <your-ip>:80>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
You should have the SSL-enabled VirtualHost running on the same IP.
0 Responses to “Apache: Force all Visitors to use HTTPS”
Leave a Reply