User Tools

Site Tools


internet:hosting:redirect

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
internet:hosting:redirect [2014/07/14 15:49]
gcooper
internet:hosting:redirect [2018/11/20 07:38] (current)
gcooper
Line 10: Line 10:
 vim .htaccess vim .htaccess
 </file> </file>
 +
 +===== Entire Site Somewhere Else =====
  
 <file> <file>
Line 16: Line 18:
 </file> </file>
  
 +===== Redirect HTTP to HTTPS =====
 +
 +<file>
 +RewriteEngine On
 +RewriteCond %{HTTPS} off
 +RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
 +</file>
 +
 +A permanent version:
 +
 +<file>
 +<IfModule mod_rewrite.c>
 + RewriteEngine On
 +  RewriteCond %{HTTPS} !on
 +  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 +</IfModule>
 +</file>
internet/hosting/redirect.1405374562.txt.gz · Last modified: 2014/07/14 15:49 by gcooper