Apache: Redirect if domain name does not match

Posted on: 2011/12/14 Tags: apache

Redirect everything to dratir.ch:

RewriteEngine On
Rewritecond %{HTTP_HOST} !^dratir\.com
RewriteRule (.*) http://dratir.com/$1 [QSA,R=301,L]