Dear mod_perl types,

A system I have installed relies on doing redirects like the code below, but 
the redirects don't happen, I just get blank pages in the browser.

I have tested temp redirects in httpd.conf and they work fine.

Can anyone tell me if the code below should work, or is there something I need 
to call to get the Location header output?

use strict;

use Apache2::RequestUtil ();

my $request=Apache2::RequestUtil->request();
my $url='https://www.some.place.ac.uk/perl/newscript';

$request->status_line("302 Moved");
$request->headers_out->{'Location'} = $url;
print STDERR "redir: redirecting to $url\n";

exit;

Reply via email to