On Wed, Sep 18, 2002 at 07:43:43PM +0530, Sylbert L wrote: > 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");
I think you want $r->header_out("Location" => "http://domain.com/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 -- Robert Landrum Systems Programmer