[Zope] Re: Apache, VirtualHostMonster and complex rewriterule

Stefan H. Holek stefan@epy.co.at
Tue, 28 Jan 2003 13:37:22 +0100


Using %{HTTP_HOST} is not recommended as it will contain the port if=20
present in the URL. %{SERVER_NAME} works perfectly for me, however.

Stefan


--On Montag, 27. J=E4nner 2003 12:24 -0600 Evan Simpson <evan@4-am.com> =
wrote:

> Ed Leafe wrote:
>>     Look into RewriteCond - it supports conditional based upon the
>> host.  In you case, something like:
>
> Ah, yes.  Better yet, some variant of the following may work:
>
> RewriteCond %{HTTP_HOST} ^(.*)\.myhost\.com
> RewriteRule ^(.*)
> http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/%1/VirtualHost
> Root/$1 [P,L]
>
> Cheers,
>
> Evan @ 4-am

--
Those who write software only for pay should go hurt some other field.
/Erik Naggum/