[APACHE] Redirect http to https

[APACHE] Redirect http to https

To redirect al http traffic to https you have to put this code inside the virtualhost script

RewriteEngine On
RewriteCond %{HTTPS}  !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

Leave a Reply

Your email address will not be published. Required fields are marked *