[Zope] efficient internal redirect

Andy Heath a.k.heath@open.ac.uk
Mon, 13 Mar 2000 12:03:38 +0000


> Why not derive a specialized version of my product ("Redirector Method")
> that descends from not Folder, but SimpleItem? If each such method
> represents only a single "mapping", you get what you ask for.
> 
> Of course, if you have plugged your Zope into Apache, then it would be
> more efficient to use mod_rewrite anyway.

You have misunderstood what I'm asking completely (probably my fault).
I am using apache and zope, some pages served via the zope-->apache
route, some
directly from Zserver (faster than going via apache) and some just with
apache. Some addresses are already being rewritten by apache - that's
not
a problem.  The mechanism I am seeking to use is just something like

<dtml-var destinationPage>.

Since this doesn't go back to the client between it has to be faster
than going back to the client and doing another request for these
particular
pages (which are in this database anyway).

Please can people reply to my original post without recommending
the redirector product.  I've reproduced the post below in the hope
someone can answer it for me.  Please don't reply telling me how
marvellous the redirector is - yes its a good idea but its not
what I'm looking for here - I'm just looking for some help to
know what's the fastest method and how to code it.

Original post
-------------
I have some pages within zope which are linked
to externally (from non-zope pages).  I want
to have some sort of internal index so that I can
move the zope pages around completely within zope
(move a page and change its index) without breaking
or having to change the external in-pointing links.

This mechanism will come into play for nearly every
page in my system so I'm looking
for the most efficient code to do this.

My thinking about possibilities for the index :-

methods in a folder
properties of a folder
properties of a dtml-doc
some other sort of data structure

For the redirection its obviously more efficient to
do it something like dtml-var rather than redirect
back to the client but (as my other posts show) I'm
often really struggling to get my object references
right (only partial understanding - looking forward to
better documentation) I'd appreciate some help here
too.

What's the most efficient way?

Andy

-- 
-------------------------------------------------
Andy Heath                    a.k.heath@open.ac.uk
The Open University           +44 (0) 114 2885738