IX. HTML
========
Foteos Macrides has implemented the HTML functionality for the server. It
emulates HTTP/0.9 file serving and search capabilities, and can service both
HTTP/0.9 and HTTP/1.0 (HTTP2) hypertext (WWW) browsers or emulations.
To set up tuples for serving HTML to a hypertext browser, designate Type=h,
and prefix "GET /" to what the Path= field otherwise would be on OpenVMS. For
example, this tuple in a .links file or lookaside entry invokes the hypertext
browser for a local foo.html file:
Name=Overview of WWW (via WFEB's home page)
Type=h
Port=+
Path=GET /h[_WWW]_default.html
Host=+
Leave out the 'h' from the Path= field for a link to a WWW http server:
Name=Global Network Navigator
Type=h
Port=80
Path=GET /GNN-ORA.html
Host=nearnet.gnn.com
To do searches, substitute '7' for 'h' in the Path:
Name=Indexed search of VMS_Server.doc in hypertext mode
Type=h
Port=+
Path=GET /7[_Shell]search.shell [_FileServ._Server]vms_server
Host=+
Name=EGREP search of server sources in hypertext mode
Type=h
Port=+
Path=GET /7[_FileServ._Server]*.*;
Host=+
Of course, there's no point in using hypertext mode for searches of entirely
plain text, but if a directory contains any hypertext documents, they can be
assigned hypertext tuples via lookaside files or ACL-Resident lookaside
entries, so that the menu of hits returned from the search will include tuples
for accessing those documents as processed hypertext.
To generate and pass a directory menu to the hypertext browser, substitute
'1', instead of 'h' or '7' in the Path. To pass the raw hypertext file,
substitute '0', or use a standard gopher tuple for text files (Type=0, and the
'GET /' omitted from the Path= field).
Use standard URL's in anchors for accessing the Gopher server or its
particular tuples from foo.html's, or in arguments passed to lynx or other
hypertext browsers from the command line. That is,
$ lynx "gopher://sci.wfeb.edu:70/"
would invoke a session on the WFEB gopher server, with lynx instead of the
gopher client, and any tuples with "Path=GET /" would be
handled as if lynx were connected to a WWW http server.
In the Gopher+ client, the '=' command displays the URL in addition to the
standard tuple information for the item at which you are pointing. Use this
facility if you are uncertain about how to construct the URL for inclusion in
the anchor of a hypertext document, or as a command line argument to a
hypertext browser, for standard gopher items. However, when the Gopher+
client converts a hypertext tuple to a URL, it retains gopher syntax, which is
unnecessary. For example, for the tuples shown above, the WFEB and GNN home
pages will be shown as:
URL: gopher://sci.wfeb.edu:70/hGET /h[_WWW]_default.html
URL: gopher://nearnet.gnn.com:80/hGET /GNN-ORA.html
These will work with the lynx browser, but can be simplified. You can replace
'gopher:' with 'http:', delete the 'hGET /', and if it's a WWW server let the
port be defaulted to 80, so that you use:
$ lynx "http://sci.wfeb.edu:70/h[_WWW]_default.html"
$ lynx "http://nearnet.gnn.com/GNN-ORA.html"
or, for anchors in a hypertext document:
Overview of WWW
Global Network Navigator
The OpenVMSGopherServer also can be used as a dedicated http server. In this
case, you should install the server on port 80, and offer only local documents
for browsing or searching, with anchors for other http, gopher, wais, news,
archie, etc., servers or services in those local documents (as opposed to the
tuples of your .links files). You can overlap the directory trees of your
gopher server and http server by making the root directory of the http server
a subdirectory of the gopher server, and including only material appropriate
for the http server implementation in that limb of your overall gopher data
tree. The gopher server can then access the HTML material appropriately, and
the http server will not offer other gopher material, or links to other gopher
servers or services, inappropriately (that is, using an 'http:' URL when it
should be using a 'gopher:' URL). The http server can access your entire
gopher data tree as well, but via appropriate URL's in the anchors of its
local hypertext documents. Accessing your gopher data tree via hypertext
documents enables you to embed your gopher items in descriptive or explanatory
text, rather than requiring _ABOUT or 00README files as separate menu items.
.