Apache redirect rule Always fires on every request

Thus, all rewrite rules are always triggered. Does this hiding another domain that I host on the server?

I can't figure out what happened and it's time to call 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

      

0


source to share


2 answers


Place the rewrite rules inside your directive <VirtualHost>

and it won't affect your other domain.



+2


source


Have you tried using %{SERVER_NAME}

instead %{HTTP_HOST}

? I found it %{SERVER_NAME}

plays well with subdomains.



0


source







All Articles