Pages

Monday, 28 October 2013

Forcefully redirect http to https

You can set rules in .htaccess file of the domain to forcefully redirect a domain to use https protocol.

Use the code given below in .htaccess file.
==========
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://<domain name>/$1 [R,L]

==========

Note: Use the domain name in place of <domain name> 

No comments:

Post a Comment