Dear List,

I am trying to add an AccessRule to a folder so our friendly Monster
redirects people to the same object in another folder in the Zope root,
i.e. if people visit

I would like them redirected to

I have a added a "Script (Python)" object to my foo folder that looks
like this:

  from zExceptions import Redirect
  moved = '%s?%s' % (context.REQUEST['URL'].replace('foo', 'quux'), 
  raise Redirect, moved

Then I have set an access rule on the folder by adding a "Set Access
Rule" object through the ZMI which points to the script object. My
access rule fires as expected, but anything after the foo is dropped.
That is,
redirects to
redirects to

How can I make it pick up the right object? Testing
context.REQUEST['URL'] outside of an access rule looks like it should
work, but apparently the access rule eats part of the URL.

The only documentation I have been able to conjure up is which doesn't help much. I have
also tried to make sense of the code in but I'm
afraid the whole map-and-stack thing is a bit beyond me.

Environment: SiteAccess-2.0.0, Zope-2.9.8 with python 2.4.2 on SUSE.

... et nemo ex vobis interrogat me: »Quo vadis?«
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to