Solved

Redirect

Posted on 1998-10-26
3
155 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.

914 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now