Forum OpenACS Improvement Proposals (TIPs): Tip #16 (Approved): Include new package: Redirect

I would like to include the redirect package in the toolkit. From its documentation:

This is a simple package that sends a redirect to another location, depending on its parameter settings. It is intended for the situation when you moved parts of your site to another location in order to reorganise your site, but don't want old links such as users bookmarks, links from remote sites, external search engine hits etc. to break.

Usage

Mount it at the old location using the openacs site-map, and set its NewURL parameter to the new location. E.g. when you moved a tree of your site from '/some/old/path/' to '/newurl/' then mount an instance of redirect at '/some/old/path/', and set its NewURL parameter to '/newurl/'.

More at https://openacs.org/forums/message-view?message_id=118065.

The package is in file-storage: https://openacs.org/storage/file?file_id=118294

I would also suggest to set the core flag to true so that it gets installed upon OpenACS installation, since it serves a general purpose that might as well be implemented in the site-map/request-processor if it wouldn't be easier like that as a package, and it is fairly lightweight (no datamodel, few files).

Collapse
Posted by Simon Carstensen on
Very cool. Has this been committed yet? I couldn't find it anywhere in CVS.

I was wondering how hard it would be to implement a "Move instance" feature in Site Map that does exactly what you describe above - moves the package to another URL and then mounts the redirect package at the old one.

Collapse
Posted by Jade Rubick on
I really like this idea.
Collapse
Posted by Andrew Piskorski on
It doesn't sound like a very capable redirect package, but it is very small and simple (just one short index.vuh file), so sure, why not include it in the toolkit? Fancier redirect functionality could always be added into this package at a later date if desired.
Collapse
Posted by Lars Pind on
I'm not convinced it should be part of initial-install (core), but I do think we should put it in CVS.
Collapse
Posted by Tilmann Singer on
Please, can someone else from OCT approve this TIP so that I can commit it before the freeze? I'll change it to not be part of a default install as Lars suggested.
Collapse
Posted by Roberto Mello on
Good work Til. This will be useful to many.

-Roberto

Collapse
Posted by Roberto Mello on
Hmmm, I just thought of this...

How dos Redirect compare with the Gatekeeper package? Shouldn't those be integrated or merged? If not, then should redirect superced gatekeeper (to avoid yet another redundant, non-maintained package)?

Gatekeeper seems to do more than redirect, like forward cookies.

If Redirect is going to superceed Gatekeeper, we need some upgrade path, no?

-Roberto

Collapse
Posted by Tilmann Singer on
Gatekeeper does something different in my opinion - it passes the request through, and adds openacs security handling. I don't see a problem having different packages for that - actually it is less confusing this way.

Nevertheless gatekeeper could use some documentation.

Collapse
Posted by Don Baccus on
How hard would it be to add your index.vuh file to gatekeeper with some documentation and a flag which tells the mounted instance whether or not to do a simple redirect or to do the more complex security stuff gateway does?

Though I like "redirect" as a name better - I know what that does, I just don't know how much that does from the name, while "gatekeeper" doesn't tell me much.

I approve of it being added regardless, just asking a question, though I'm with Lars, let's not install by default.

Collapse
Posted by Peter Marklund on
Approved
Collapse
Posted by Tilmann Singer on
Added redirect package to cvs, with the option to be installed by default set to false.

I did not consider adding the functionality to the gatekeeper package, due to the misleading name. Should we merge gatekeeper into redirect? Rename gatekeeper to http-pass-through? Leave it and pursue more important issues?