[Zope] Monitoring transversal

Oliver Bleutgen myzope@gmx.net
Thu, 13 Jun 2002 19:58:50 +0200

Kevin Carlson wrote:
> Hi Oliver,
> Thanks for the response.  This is putting me on the right path, but it's not
> quite what I need.  If I navigate to the URL
> http://www.whateverserver.com:8080/bob and the method or script named 'bob'
> doesn't exist, I want to be able to trap that and look up some values in a
> database.
> I tried replacing the index_html DMTL method with a Python script and it
> doesn't get called if I navigate to the URL shown above.  I guess I sort of
> need a traversal hook of some sort -- I've been digging in the source to
> figure out how to do this, but have come up empty so far.
> Any other ideas?

sorry Kevin, did reply too fast.


I don't have the time to dig into that deeper, but since nobody else 
more knowledgable answered till now, let me try another hint.

Maybe you shold look into "access rules", formely part of the siteroot 
product. AFAIK it should be possible to set a python script as an access 
rule and use this to do the stuff you want to do (I suspect you wouldn't 
use the subpath method then).

Another remark, if you plan to put an http server like apache in front 
of zope anyway, you could use rewrite rules to point every request to 
your python script, i.e.


gets rewritten to


So you could extract the data you need via subpath.