[Zope] path to argument rewrite

Oliver Bleutgen myzope@gmx.net
Wed, 08 May 2002 17:16:05 +0200


Russell Uman wrote:
> howdy.
> 
> i'm writing a zope page that generates dynamic content based on the query string in the URL. for example:
> 
> http://index_html?content=introduction is different from http://index.html?content=contact
> 
> some search engines have trouble indexing pages by query strings. a common way around this is to use a path instead of a query
> string in the URL and rewrite the path as a query string. so:
> 
> http://index_html/content/introduction is rewritten as http://index_html?content=introduction by the webserver.
> 
> i know how to use a rewrite rule in apache to do this.
> i've heard that this is doable in Zope.
> but i can't find any documentation on how to do this. can anyone help?
> 
> thanks!
> 
Hi,

this is doable in various ways. The easiest one I can think of is using 
a python script in zope. Look at the bindings tab of the script, under 
"subpath".
SQl Methods can do that also out of the box, to see how it's done in a 
product, you can take a look at
http://www.zope.org/Members/NIP/PathHandler.


cheers,
oliver