Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
apache:redirect-http-to-https [2011-05-13 23:57:34]
garrett.plasky Approved
apache:redirect-http-to-https [2014-08-06 01:11:26]
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://
  
-<sxh apache>RewriteEngine On+<code>RewriteEngine On
 RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
-RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]</sxh>+RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] 
 +</code>
  
 {{tag>how-to apache}} {{tag>how-to apache}}