[Zope] Site evolution and redirection strategies

Oliver Bleutgen myzope@gmx.net
Thu, 05 Sep 2002 18:46:14 +0200


Howard Hansen wrote:
> We're contemplating some major changes to our sites that will break many
> existing URLs.  In our first transition (from Front Page to Zope!), I
> handled the issue by matching the old URLs and creating a few DTML Methods
> with code along the lines of:
> 
>     <dtml-call expr="RESPONSE.redirect('index_html')">
> 
> This works fine, but it's not terribly clear what's going on.  It seems like
> it would be reasonably trivial (i.e., within my powers) to create a python
> product that stored the new destination and performed the redirection.  This
> product would have the advantage of looking different than a simple DTML
> method.
> 
> This morning I got a list from my boss of old URLs and their new names,
> which got me thinking....  What if there existed a centralized redirection
> product that allowed me to enter lists of old and new URLs and have the
> redirection automagically happen?  Seems to me that this starts to get into
> the realm of acquisition and other deep voodoo magic best left alone.
> 
> I'm leaning toward creating the simple product and leaving it at that, or
> perhaps additionally creating a script that generates the redirect objects
> automatically from my list of old and new URLs.


Are you using apache in front of zope? If yes, take a look at the 
RewriteMap directive,
http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteMap

I guess this beast is a little bit more resource friendly than a python 
script approach, since you will have to run this script at every request.

cheers,
oliver