[users@httpd] mod rewrite conditions question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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} (.*).bpapa.mysite.com

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
guywhositsnexttome.mysite.com, prettygirlacrossfromme.mysite.com, and
of course just mysite.com in production.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux