httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brian papa <>
Subject [users@httpd] mod rewrite conditions question
Date Thu, 22 Sep 2005 23:22:26 GMT
I'm using mod rewrite and it's working just fine and dandy. But, I
want to deploy it in different enviornments that use different virtual
hosts. So right now I have the Rewrite Condition -

RewriteCond %{HTTP_HOST} (.*)

For my local machine, which works fine but that's kinda ugly. I tried
doing this -

RewriteCond %{HTTP_HOST} (.*)%{SERVER_NAME}

but that didn't work, it tried to match the literal "%{SERVER_NAME}"
instead of it's actual value. Is there a way to umm... "unescape" the
variable so that it actually spits out it's value and I have something
that can deploy nicely? Or am I stuck with having to edit the
RewriteConds each time I deploy to a different virtual host?

It's going to be run under many different virtual hosts like,, and
of course just in production.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message