Foo Ji-Haw wrote: > Hi guys, > > I used to use CGI->redirect, but what is the requivalent for modperl2?
Set the 'Location:' header and return a REDIRECT return code use Apache2::Const -compile => qw(REDIRECT); # Same as HTTP_MOVED_TEMPORARILY my $location = "http://www.google.com/"; sub handler { my $r = shift; $r->headers_out->set(Location => $location); return Apache2::Const::REDIRECT; } -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature