Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: 301 Redirect using Perl

by sgifford (Prior)
on Mar 26, 2007 at 16:05 UTC ( [id://606605]=note: print w/replies, xml ) Need Help??


in reply to 301 Redirect using Perl

Your code looks OK to me, and indeed works on my Web server. Is that the entire script? And is it run as a standard CGI script (not mod_perl, nph, etc.)?

Two useful debugging tools are to run the script by hand to see exactly what it's printing, and getting the URL where your script resides with a command-line tool, like wget or lwp-request from LWP.

philcrow suggests that you use CGI's redirect method, but that actually just prints a Status and Location header, just as your script does. Still, this module is more likely to work under mod_perl and the like, and might be worth a try, if nothing else to verify that it's behavior is identical to your script.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-25 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found