Redirect all traffic to HTTPS using an .htaccess file.

Last modified: April 13, 2020
You are here:
Estimated reading time: < 1 min

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]
Was this article helpful?
Dislike 0
Views: 40
Customer Services Contact

Need Help? Send a Ticket to our 24X7 Technical Support Team

Subtitle
Subscribe Newsletter

Subscribe to Casbay Newsletter for online tips, events and latest promotion !

Copyright © 2010 – 2020 Casbay Sdn. Bhd. (1042688-D). All Rights Reserved.

All Trademarks Are The Property of Their Respective Owner.