I want to redirect 301 the following case: http://www.domain.com/index.html to https://www.domain.com
Hello twin, RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Code (markup): This code will redirect all your http request to https.
Here you go RedirectPermanent /index.html https://www.domain.com Code (markup): https://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirectpermanent