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

How to redirect HTTP to HTTPS using an .htaccess file - force ssl htaccess

  1. HostStud
    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]