How to redirect HTTP to HTTPS using an .htaccess file?

How to redirect HTTP to HTTPS using an .htaccess file?

Through .htaccess you can easily redirect your http traffic to https secure layer. You can force SSL https redirection in htaccess file :

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Author
HostStud
Views
1,788
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from HostStud

Top