Knowledgebase
Redirect all traffic to HTTPS using an .htaccess file.
Posted by 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]
 

 

 

(1 vote(s))
Helpful
Not helpful

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