[Zope] Doubled traversal stacks when using vhosting

A.Beisler cortex at gmx.net
Mon Dec 10 10:14:36 EST 2007

Hi List,

I am running Zope 2.10.4 and set up a virtual host with a rewrite rule in
apache 2.2. The rewrite rule I got from the witch.

It looks like this:
ServerName www.myproduct
RewriteEngine On
RewriteRule ^($|/.*) \\
http/%{SERVER_NAME}:80/MyProduct/VirtualHostRoot$1 [L,P]
ProxyVia on

The MyProduct object has a pre-traversal hook installed.
There are two items involved when visiting the url of the product: the
index_html of the object and a style.css.

When I go to the direct url, the
traversal stacks look like this:
['style.css', 'css']

But when I go to the vhost url http://www.myproduct/, it looks like this:
['/', 'virtual_hosting']
['style.css', 'css', '/', 'virtual_hosting']
['style.css', 'css']

Since I want to modify the traversal stack a little bit to do some kind of
dispatching, I am slightly confused, where the '/', 'virtual_hosting' part
is coming from and how I should handle it.

The second issue is that when I go to the direct url a second time, the
style.css doesn't pop up anymore (which is fine... seems to be cached or
so). But when I go to the vhost url a second time, I get the very same
traversal stacks each time.


More information about the Zope mailing list