Script headers
When your script finishes execution, it must output two things. The
first is a short header to tell the server some information about the
contents. After the header is the document your script has generated.
Header contents
The header is similar to MIME or mail headers. It consists of a series
of lines, each with an item, followed by a colon, followed by its
argument. The header is terminated by a linefeed on a line by itself.
Currently recognized header items:
- Content-type: type/subtype
The MIME-like type of document your script is returning, e.g.
text/html.
- Location: where
This item be used for two purposes, depending on what
where
is.
- A full URL
If where
is a full URL, the server will issue the client
a redirect which will then point them to the URL you specify.
- A pathname
The server will perform access control, and send the client either the
file or an error message. Note that any relative links an HTML
document returned this way will not work.
Return to GET
script overview
httpd@ncsa.uiuc.edu