How To: Adding a HTTPS rewrite to your .htaccess file.
- 28/09/2021 13:47
When you add an SSL Certificate to your domain your site will not automatically redirect to the secure version. This means you will need some coding to "force HTTPS" to be used. You can do this by adding code to your .htaccess file.
The below is an example that needs to be added to the top of the .htaccess file of your domain.
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
This code does not work for all sites, but it does work for a large amount. If this does not work for you we advise consulting a website developer.