[Zope] Redirecting all objects in a folder

Jesus Cea jcea at jcea.es
Wed Nov 30 03:25:00 CET 2016


On 21/11/16 05:46, Dan Gaibel wrote:
> How can I make it so that any object accessed under a particular folder
> gets redirected to another URL? 
> 
> In other words, someone going to the URL website.com/folder/page1.html
> <http://website.com/folder/page.html> or website.com/folder/page2.html
> <http://website.com/folder/page.html>  (or any page in the /folder/
> directory) gets redirected to google.com <http://google.com>. 

If your "folder" is not a folder at all but a script, you can get access
to the subpath and do whatever.

That is, if "folder" is a script, then
"http://website.com/folder/page.html" will call the script called
"folder" with "page.html" as subpath parameter. You can do a redirect in
the script code, using the subpath or ignoring it, as you need.


-- 
Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea at jabber.org  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.zope.org/pipermail/zope/attachments/20161130/4f5df9f3/attachment.sig>


More information about the Zope mailing list