[Zope] VirtualHostMonster and "unpack list of wrong size"
Dieter Maurer
dieter@handshake.de
Wed, 23 Oct 2002 20:23:00 +0200
Jo Meder writes:
> ...
> Apache is intrumented with the usual Rewrite-Rule a la
>
> RewriteRule /(.*) http://localhost:1234/VirtualHostBase/http/%{HTTP_HOST}:80/cms_root/some_name/VirtualHostRoot/$1 [L,P]
>
> Now there seem to be cases (we tracked most of them to usage of wget as
> a user agent) where VirtualHostMonster tries to decode
> "www.hostname.tld:80:80". The error occurs when VHM tries to execute
A well known problem:
Some HTTP clients include the port in the "HOST" HTTP header.
Use an Apache "RewriteCond" to strip away the port if it is present:
RewriteCond %{HTTP_HOST} ([^:]*)(:.*)?
RewriteRule ..../http/%1:80/...
Dieter