[Zope] Site evolution and redirection strategies

Sven Rudolph rudolph@medical-tribune.de
Thu, 5 Sep 2002 20:15:01 +0200


Hello Howard,

> ...This morning I got a list from my boss of old URLs and their new names,...

If the list is short enough to be manually handled, you can try this in your "standard_error_message":
(Freehand and untested!)

<dtml-if "error_type=='NotFound'">

<dtml-call "REQUEST.set('URL_TRANSLATOR',
{
'/oldurl1':'/newurl1',
'/oldurl2':'/newurl2',
}
)">

<dtml-if "_.str(PATH_INFO) in URL_TRANSLATOR.keys()">
<dtml-call "RESPONSE.redirect(URL_TRANSLATOR[_.str(PATH_INFO)])">
</dtml-if>

</dtml-if>

Beware of possible recursions with this!

Greetings

Sven

-- 
Sven Rudolph, Programmierer
GermanMedicalServices.de GmbH
Unter den Eichen 5, 65195 Wiesbaden
Tel.: 06 11 / 97 46 25 2