Sunday, August 16, 2015

Redirect http page to https in .htaccess file

You could use this code to redirect a request to HTTPS in apache:

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

No comments:

Post a Comment