Re: Redirecting all objects in a folder

Jesus Cea <[email protected]> Wed, 30 Nov 2016 03:25:00 +0100
Newsgroups gmane.comp.web.zope.general
Message-ID <[email protected]>
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                         _/_/      _/_/_/        _/_/_/
[email protected] - http://www.jcea.es/     _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea-/[email protected]  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

_______________________________________________
Zope maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYPjh/AAoJEGjgN61Khv5D1LIH+gKu5e/9E+2eI1Xit0tetlS3
Yv5YmUU7esBOvzzFTsRS8A62RfOvD703ucdZgPxmefJRjZsy6OmaXGJuCG5fmXDH
0NquVVweJotbOrBbAYocm1/zYv4kC1jax0zX1pyxza7CnzzC73g7ae0Jcie8ggir
BucHg1Ij3R7MCjEfWFWBgggkDLcZ4TMJy/aqdWy2Td0ZVe9zY/uZSp3prHMzrYtt
TfU7UD3FrrtQJoF/DP0EG34rgH0W5KuPyXXSrfA08my8GFZ6b5klk/CqMZWEDUrN
bS5sRYD4oF/k9dfry9FG2KDxOa8BuH1Hqj/vk7n1cM64use1yaLMeLmOpM3ZpC4=
=Zk6N
-----END PGP SIGNATURE-----