in reply to failing to generate proper http redirect headers

Instead of -location, use -url:
print $q->redirect(-url => "http://redirected_url");
which produces
Status: 302 Moved Location: http://redirected_url
(Note the uppercase 'L'. I suppose you could also use -Location, but the CGI.pm docs say to use -url (at least the last time I looked).)

Update As isotope pointed out, the docs now say to use -uri, though -url will still work.

Replies are listed 'Best First'.
Re: Re: failing to generate proper http redirect headers
by AidanLee (Chaplain) on Sep 03, 2003 at 15:34 UTC

    well, the depressing thing is that i've already tried all these variations mentioned:

    $q->redirect('bare url'); $q->redirect(-uri=>'url'); $q->redirect(-url=>'url'); $q->redirect(-location=>'url');

    and no successes. anyone have any other ideas? I'm beyond stumped