[Zope] HTTP Post Handler In Zope

Tino Wildenhain tino at wildenhain.de
Tue Dec 27 17:29:32 EST 2005


Tom Purl schrieb:
> Hi everyone.  I'm converting my personal web site from a Wordpress blog
> into a ZWiki wiki site.  I transferred all of the content, and would like
> to create some "redirect pages" so that anyone visiting my old page url's
> would be redirected to their new home.  So, if someone wanted to visit the
> following old, Wordpress url:
> 
> http://mysite.com/?p=30
> 
> ...the would get redirected to this ZWiki page:
> 
> http://mysite.com/SomePageName
> 
> The problem is that I'm not sure how I can "catch" the old url requests. 
> I tried creating a Script (Python) object named "?", but Zope didn't let
> me use that name.
> 
> Does anyone have any idea as to how to do this?  Any help at all would be
> greatly appreciated!

You replace index_html with a python script with that name.

In this script you get p by
p=context.REQUEST.form.get('p','')

if p:
    find old target via catalog? Return it or
    redirect...

return usual content





More information about the Zope mailing list