Note the HTTP/1.1 302 line at the top of the headers. When I make a script which will print out this exact output, with the exception of having an HTTP/1.1 200 header rather than the 302, my browser will not follow the Location header and will display the "This document has moved" html. This is probably what is happening with your server, if this is what is happening you will need to consult the documentation for your web server (or try a search on deja) to find out if it is possible to change the status line.[nardo@ilona cgi-bin]$ cat loc.cgi #!/usr/bin/perl print "Location: http://www.google.com\n\n"; [nardo@ilona cgi-bin]$ telnet localhost www Trying 127.0.0.1... Connected to ilona. Escape character is '^]'. GET /cgi-bin/loc.cgi HTTP/1.0 HTTP/1.1 302 Found Date: Wed, 05 Jul 2000 20:25:56 GMT Server: Apache/1.3.9 (Unix) Location: http://www.google.com Connection: close Content-Type: text/html <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>302 Found</TITLE> </HEAD><BODY> <H1>Found</H1> The document has moved <A HREF="http://www.google.com">here</A>.<P> <HR> <ADDRESS>Apache/1.3.9 Server at 216.254.31.132 Port 80</ADDRESS> </BODY></HTML> Connection closed by foreign host.
In reply to Re: Why doesn't the Location header work?
by nardo
in thread Why doesn't the Location header work?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |