Apache: Redirect if domain name does not match

Note: This post is mostly kept for nostalgic reasons :-)

Redirect everything to dratir.ch:

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

Next post: "Install own CA-Certificate in Linux"
List all Blog posts