?
Solved

Redirect

Posted on 1998-10-26
3
Medium Priority
?
164 Views
Last Modified: 2013-12-25
Why isn't this script working:

print "Location: http://.../danke.asp\n\n";

The headers returned are:

HTTP/1.0 200 OK
Location: http://.../danke.asp
0
Comment
Question by:soeding
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
WileyKat earned 150 total points
ID: 1829304
You need to use:

print "HTTP 301 Redirect\n\n";
print "Location: http://.../danke.asp";
0
 
LVL 1

Author Comment

by:soeding
ID: 1829305
Thanks.
Easy, although it has to be:

print "HTTP 301 Redirect\n";
print "Location: http://.../danke.asp";

I just thought one could not add a header, when it was set - as in ASP.
0
 
LVL 2

Expert Comment

by:WileyKat
ID: 1829306
Many CGIs return a Redirect header. Some also return 200 OK, 401 Access Forbidden, and 404 Not Found.
0

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question