Know-How für Ihr Projekt

Perl Documentation


redirect - create static redirections


Plugin redirect
RedirectTarget /foo
RedirectType permanent


This plugin provides a simple redirection mechanism. It is not nearly as flexible as Apache's well-known mod_rewrite, although it can serve as boilerplate code for more complex redirection rules.


RedirectTarget STRING

The target to be redirected to. It may be relative or absolute.

RedirectType { permanent | temporary | seeother }

The type of redirection. Default is "permanent", which instructs clients not to use the original request URI again, if possible (HTTP status code 301).

The other two types instruct the client to retry the original URI on later requests.

"temporary" allows a HTTP/1.1 client to re-POST forms (307), while "seeother" explicitly instructs HTTP/1.1 clients to use a GET request, discarding POST data (303). For HTTP/1.0 clients (and below), both are mapped to status code 302, which usually results in "seeother" behaviour, although it should result in "temporary" behaviour according to the RFC.