Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

cgi redirect

by chuleto1 (Beadle)
on Jul 31, 2003 at 18:27 UTC ( [id://279705]=perlquestion: print w/replies, xml ) Need Help??

chuleto1 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks:
I am having problems redirecting using the CGI module
$q = new CGI; $q->redirect( -location=>"train1.htm");
This is not working for me. Any hints?
Thank you,
Arturo Ordaz

Replies are listed 'Best First'.
Re: cgi redirect
by blokhead (Monsignor) on Jul 31, 2003 at 18:30 UTC
    The redirect method simply returns the text of the redirect header, you still have to print it!
    print $q->redirect("train1.htm");
    Also be sure that no other headers (Content-type, etc) are printed before this line.

    blokhead

      Guh... I remember making that very mistake just a month ago. So aggravating, and so embarassing when I realized that that was the problem...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2025-05-20 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.