Applies To:
- Linux Web Hosting
Description:
To force HTTPS it is possible to create or update an .htaccess file in the public_html folder to include the following:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
It is important to ensure that the 'RewriteEngine On' line is not repeated within the .htaccess file and that it appears above any other 'Rewrite' lines.