Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 26th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Redirect all pages of one TLD to another
  2. RewriteCond %{HTTP_HOST} !^(www.)?domain.com$ [NC]
  3. RewriteRule .?$ http://www.domain.com%{REQUEST_URI} [R=301,L]
  4.        
  5. RewriteEngine On
  6. RewriteCond %{HTTP_HOST} !^(www.)?domain.com$ [NC]
  7. RewriteRule ^(.*) http://www.domain.com/$1 [R=301,NE,L]
  8.        
  9. RewriteCond %{HTTP_HOST}   domain.(org|net) [NC]
  10. RewriteRule ^/(.*)         http://www.domain.com/$1 [L,R=301]
  11.        
  12. RewriteEngine On
  13. RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
  14. RewriteRule ^(.*)$ http://www.domain.com$1 [R=301,L]