mrc has asked for the wisdom of the Perl Monks concerning the following question:
I'm calling it withpackage My::Filter; use strict; use warnings; use CGI::Cookie (); use Apache2::RequestRec (); use APR::Table (); use Apache2::Const -compile => qw(REDIRECT); my $location = "http://www.test.com"; sub handler { my $r = shift; my $cookie = CGI::Cookie->new(-name=> 'mod_perl', -value => 'awesome'); $r->err_headers_out->add('Set-Cookie' => $cookie); $r->headers_out->set(Location => $location); return Apache2::Const::REDIRECT; } 1;
No errors, nothing :(<Directory "/path/to/test/account/"> PerlOutputFilterHandler My::Filter </Directory>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl filter for redirection
by Anonymous Monk on Mar 24, 2010 at 17:50 UTC | |
by mrc (Sexton) on Mar 24, 2010 at 17:57 UTC | |
by mrc (Sexton) on Mar 24, 2010 at 18:54 UTC |