Solved

Redirect

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

707 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