Redirect http to https using htaccess


Code: write below code in .htaccess file.



        RewriteEngine On   
        RewriteCond %{HTTPS} off   
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]   

Comments