Hi,
If you just created your .htaccess file, use the following code to set up the URL redirect to the HTTPS version of your website:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 [OR]
RewriteCond %{HTTP_HOST} ^www\.yourDomainName\.com [NC]
RewriteRule ^(.*)$ https://yourDomainName\.com/$1 [R=301,L]
If your .htaccess file already exists in your hosting account, do not duplicate ReWriteEngine On. Insert the lines that begin with ReWriteCond and RewriteRule directly after the already existing ReWriteEngine On.
You may also check the Redirect feature on their cPanel account too. If it already set the redirect and you add a rewrite rule on their .htaccess file, it will overlap to each other.
Sorry for the inconvenience.
Comments
0 comments
Article is closed for comments.