[Zope] grokking _vh_ in VirtualHostMonster
seb bacon
seb@jamkit.com
Thu, 16 Aug 2001 14:43:16 +0100
I've just spent far too long wrestling with the VHM, but I've finally
sorted it. However, I don't understand exactly what was going on, and
I'd love an explanation.
I was trying to get requests for
http://www.foo.com/Bar/rest/of/url
to look in
http://localhost:8080/demo/Bar/SomeFolder/rest/of/url
and I was using
RewriteRule ^/([^/]+)/?(.*) http://localhost:9080/VirtualHostBase/http/www.foo.com:80/demo/$1/SomeFolder/VirtualHostRoot/$1/$2 [P]
to do this. It worked, but absolute_url was resolving to
http://www.foo.com/rest/of/url. In order to fix absolute_url, I found
after much hair-tearing that the following worked:
RewriteRule ^/([^/]+)/?(.*) http://localhost:9080/VirtualHostBase/http/www.foo.com:80/demo/$1/SomeFolder/VirtualHostRoot/_vh_$1/$2 [P]
Why did the second version (with _vh_) work, but the first not?
Cheers,
seb