Knowledgebase
Redirect all traffic to HTTPS using an .htaccess file.
Posted by Sugen S. on 23 October 2017 01:37 PM

The below code when added to an .htaccess file will automatically redirect any traffic destined for http: to https:

 

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
 

 

 

(0 vote(s))
Helpful
Not helpful

Comments (0)
Copyright © 1998 - 2018 Shinjiru International Inc. All Rights Reserved.