Redirect for catalyst used easily is offered.
use Catalyst 'Redirect'; $c->get_baseurl; $c->redirect('redirect_url'); $c->redirect('/redirect_url'); $c->redirect('http://www.perl.org/');
Redirect for Catalyst used easily is offered.
Basic \s-1URL\s0 of your application is returned. If your application is executed by \*(L"http://myhost/myapp/\*(R" it returns \*(L"/myapp/\*(R" .
$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, \*(L"/\*(R" will be returned when http://www.mydomain.com/myapp/ is a proxy for http://appserver.local.server/.
Catalyst
Shota Takayama, \*(C`shot[atmark]bindstorm.jp\*(C'
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.