Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
apache:redirect-http-to-https [2014-08-06 01:11:26] shaun.reitan |
apache:redirect-http-to-https [2019-05-02 23:43:03] (current) shaun.reitan |
||
---|---|---|---|
Line 3: | Line 3: | ||
The below code when added to an .htaccess file will automatically redirect any traffic destined for http:// to https:// | The below code when added to an .htaccess file will automatically redirect any traffic destined for http:// to https:// | ||
- | < | + | < |
- | RewriteCond %{HTTPS} off | + | < |
- | RewriteRule (.*) https:// | + | |
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https:// | ||
+ | </ | ||
</ | </ | ||
{{tag> | {{tag> |