Catalyst::Plugin::Redirect - Redirect for Catalyst used easily is offered.


Catalyst-Plugin-Redirect documentation  | view source Contained in the Catalyst-Plugin-Redirect distribution.

Index


NAME

Top

Catalyst::Plugin::Redirect - Redirect for Catalyst used easily is offered.

SYNOPSIS

Top

  use Catalyst 'Redirect';

  $c->get_baseurl;

  $c->redirect('redirect_url');
  $c->redirect('/redirect_url');
  $c->redirect('http://www.perl.org/');




DESCRIPTION

Top

Redirect for Catalyst used easily is offered.

METHODS

Top

get_baseurl

Basic URL of your application is returned. If your application is executed by "http://myhost/myapp/" it returns "/myapp/" .

redirect

$c->redirect('redirect_url'); $c->res->redirect('redirect_url') is executed.

$c->redirect('/redirect_url'); $c->res->redirect($c->get_baseurl.'redirect_url') is executed.

$c->redirect('http://www.perl.org/'); $c->res->redirect('http://www.perl.org/') is executed.

When Reverse Proxy is used, get_baseurl returns the backend server's base. For example, "/" will be returned when http://www.mydomain.com/myapp/ is a proxy for http://appserver.local.server/.

SEE ALSO

Top

Catalyst

AUTHOR

Top

Shota Takayama, shot[atmark]bindstorm.jp

COPYRIGHT AND LICENSE

Top


Catalyst-Plugin-Redirect documentation  | view source Contained in the Catalyst-Plugin-Redirect distribution.