Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: failing to generate proper http redirect headers

by The Mad Hatter (Priest)
on Aug 29, 2003 at 19:44 UTC ( [id://287816]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://287816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found