If a file named ../foo.doit
is placed in a directory, that file
will be invoked as a CGI script to handle HTTP GETs and POSTs to URLs of
the form:
.../
') in the pathnames and URLs above are meant
to stand in for the usual process of URL-to-pathname translation, which
translates an "open http://www.ai.mit.edu/xperimental/foo
"
which you might do in Mosaic into an attempt by the Web server to do
something with the file /com/doc/web/xperimental/foo
.
There is another filename extension which can be used to roughly the same
effect as .doit
, which is '.nph
'. The difference
between .doit
and .nph
is that .nph
scripts have complete control of the information sent to the
client, and are therefore required to generate all HTTP/1.0 headers when
talking to an HTTP/1.0 client, and required not to generate them
when talking to an HTTP/0.9 client. These are details the server
ordinarily takes care of. For most purposes, .nph
isn't worth
bothering with. These variant extensions replace a scungier naming scheme
in the CGI/1.0
specification.
One last special case --- in playing around, you may notice that
.doit
files cannot be retrieved directly (that is, an attempt
to retrieve http://www.ai.mit.edu/xperimental/foo.doit
will
fail even if the file does exist, although an attempt to retrieve
http://www.ai.mit.edu/xperimental/foo
will properly invoke the
script). This is an attempt on my part to make sure people don't export
code without knowing about it --- if it gets in your way, just make a
symlink.