views:

589

answers:

2

So the following rewrite rules always seem to fire. This has the effect of hiding another domain that I am hosting on the server?

I can't seem to figure out what's wrong and it is time to call in the experts:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^danielhonig.com
RewriteRule ^(.*)$ http://www.danielhonig.com/$1 [R=permanent,L]

RedirectMatch ^/$ http://www.danielhonig.com/gravl
Options None
+2  A: 

Place the rewrite rules inside your <VirtualHost> directive, then it will not affect your other domain.

truppo
Tried putting them in location tags...This caused the site to redirect to the other domain all the time?
DanielHonig
A: 

Did you try using %{SERVER_NAME} instead of %{HTTP_HOST}? I've found %{SERVER_NAME} plays nice with sub domains too.

rojoca