Hi ..
I'm trying to do a simple redirect using mod_perl 2.0, Apache 2.0.40 ..
just doesn't seem to work.
This is my code, in a file called MySocket.pm
package Apache::MySocket;
use strict;
use Apache::RequestRec ();
use Apache::compat();
use Apache::Const -compile => qw(OK REDIRECT);
sub handler {
my $r = shift;
$r->header_out("/test.html");
return Apache::REDIRECT;
}
1;
This is what i added to httpd.conf :
-------------------------
<Location /ok/ok>
SetHandler modperl
PerlResponseHandler Apache::MySocket
</Location>
-------------------------
When I do this : http://localhost/ok/ok i want the web server to redirect
to: http://localhost/test.html
Where am i going wrong ? I'm not getting any errors .. even 'error_log ' is
blank. Any clues ?
Thanks