Re: CGI scripts / Location header

Daniel DuBois (ddubois@rafiki.spyglass.com)
Thu, 12 Oct 1995 08:59:15 -0500


>> Scenario: User requests a URL that points to an existant CGI script. CGI
>> script returns a "Location: localfile.html" header, indicating a
>> 'server-side' redirect, and this file doesn't exist.
>C: GET /script.cgi
>S: 302 Moved Temporarily
> Location: host://server/other-file.html
>C: GET /other-file.html
>S: 404 Not Found
>Whether this is done as two separate connections or one using keep-alive
>doesn't really matter, I don't think.

No, you misunderstand. (Actually I think this answers your question about
relative paths.)

>From the CGI documentation at http://hoohoo.ncsa.uiuc.edu/cgi/out.html:

Location
This is used to specify to the server that you are returning a
reference to a document rather than an actual document.
If the argument to this is a URL, the server will issue a redirect to
the client.
If the argument to this is a virtual path, the server will retrieve the
document specified as if the client had requested that document originally.
-----
Dan DuBois, Software Animal http://www.spyglass.com/~ddubois/
I absolutely do not speak for Spyglass.