HTTP to HTTPS

 

To force all web traffic to use HTTPS, insert the following lines of code in the .htaccess file in your website's root folder.

 

RewriteEngine On

 

RewriteCond %{HTTPS} !on

 

RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$

 

RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$

 

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

NOTE: If you have existing code in your .htaccess, add this above where there are already rules with a similar starting prefix.

 

 

If you are stuck, raise a support ticket. 

 

  • SSL, HTTP to HTTPS, SECURITY, TECHNICAL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Server Transfer: Database Error (Nova)

After a server migration, it is possible for particular errors to occur that are beyond our...

Powered by WHMCompleteSolution