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
Solved

Redirect

Posted on 1998-10-26
3
160 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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
WileyKat earned 50 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to dynamically set the form action using jQuery.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

809 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