Redirecting to secure connection

Issue :

When someone tries to access the site through the insecure URL (http) , it should redirect ( to https ) automatically.

Fix :

This can be easily achieved by putting the following code in the .htaccess file under ‘public_html’ folder :

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.yourdomainname.tld/$1 [L,R]

(Assuming that you have SSL installed on the domain ;) )

Filed Under: Quick fixesTechnical

Tags:

About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

RSSComments (0)

Trackback URL

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
InstaCarma provides outsourced web hosting technical support, helpdesk management, datacenter automation, cloud service management. Sales - 1800 810 6547 - visit www.instacarma.com