How To Force Apache To Use https

1 2 3 |
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
![]() |
1 2 3 |
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
1 2 3 4 |
RewriteEngine On RewriteCond %{HTTP_HOST} !^www.YourDomain.com RewriteCond %{HTTP_HOST} !^$ RewriteRule ^.*$ http://www.YourDomain.com%{REQUEST_URI} [R=301,L] |