Redirect http to https

From vpsget wiki
Revision as of 10:46, 29 September 2017 by Vq (talk | contribs) (Created page with "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 (.*) h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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}