Home > Apache > Redirect all non-HTTPS traffic to https using .htaccess
Bookmark and Share

Redirect all non-HTTPS traffic to https using .htaccess

Posted on April 25, 2017 | Filed in Apache

To redirect all non-HTTPS traffic to HTTPS using .htaccess, add the following to your .htaccess file:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog