Documentation for the Redirect package
Introduction
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/'.
Parameters
NewURL
The URL to redirect to. E.g. /some/path/ or http://anotherserver.com/some/path/.
Relative paths like 'some/other/path/' are not possible.
PreservePathRemainings
Wether to preserve the remainings of the requested path, e.g. if set
to true then the redirect /some/old/path/bla/bla goes to
/some/new/path/bla/bla, otherwise it goes to /some/new/path/,
regardless of what followed the request. In most cases makes sense to
leave set to true.
This also includes query parameters, so that a request for
'/some/old/path/bla?item_id=100' gets redirected to
'/newurl/bla?item_id=100' when set to true.
PermanentRedirect
Indicate to the requesting browser that this is a permanent
redirect. The browser might react by updating a bookmark to the new
url for example. Leave set to true if unsure.
Note that this results in different http status codes. A permanent
redirect is http status 301, a non-permanent is 302. See general http
documentation for more info about the consequences.
Pass Through of Requests
This package does not pass through http requests - see the gatekeeper
package for this functionality. (Maybe gatekeeper will be merged into
this package some day though.)
Last modified: Mon Sep 29 13:10:03 GMT 2003