Redirect http to https

From vpsget wiki
Revision as of 10:50, 29 September 2017 by Vq (talk | contribs)
Jump to: navigation, search

In order to redirect http to https in Apache it's enough to add these lines to .htaccess file in the web root:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}