Redirect http to https

Here is a rule that doesn’t even require you to add the URL (should work on anysite):

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Here is an htaccess file tester, so you can test the redirect rules before you add them to your site:
https://htaccess.madewithlove.be

And if you want to check each page of the site for mixed content (active mixed content will break the site), before you switch:
https://www.whynopadlock.com/

1 Like