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 [2018/03/17 11:48]
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:+===== Redirect HTTP to HTTPS =====
  
 <file> <file>
Line 22: Line 24:
 RewriteCond %{HTTPS} off RewriteCond %{HTTPS} off
 RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
-</file> +</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.1521308927.txt.gz · Last modified: 2018/03/17 11:48 by gcooper