in reply to Re: Re: Apache2 Frustrations
in thread Apache2 Frustrations
Ok. Once I wrap my stuff, how do I get the parameters from GET? How do I build a new URI from an existing one, changing only one or two params? I've read through some 500 pages in the past two days and I'm getting nowhere. I know tons about how to secure a mod_perl server, but I can't find out how to USE the bloody thing!Walk away. Seriously, just walk away for a few hours/days. This stench of despair is not good. http://perl.apache.org/docs/2.0/user/coding/cooking.html
The first argument to your handler is a Apache::RequestRec object. Now go read some documentation to see what you get with Apache::RequestRec.use CGI::Cookie (); use Apache::RequestRec (); use APR::Table (); use Apache::Const -compile => qw(REDIRECT); my $location = "http://example.com/final_destination/"; 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); $r->status(Apache::REDIRECT); return Apache::REDIRECT; } 1;
|
|---|