[9157] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: CGI scripts / Location header

daemon@ATHENA.MIT.EDU (Daniel DuBois)
Thu Oct 12 10:05:15 1995

Date: Thu, 12 Oct 1995 08:59:15 -0500
To: Brian Behlendorf <brian@organic.com>,
        Daniel DuBois <ddubois@rafiki.spyglass.com>
From: Daniel DuBois <ddubois@rafiki.spyglass.com>
Cc: www-talk@www0.cern.ch
Resent-From: www-talk@w3.org

>> 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.


home help back first fref pref prev next nref lref last post