[CTX]
[ALL]
Server Side Include in SHTML files
Server Side Include in SHTML files
On an origin HTTP-DeleGate, a local file with suffix ".shtml" is regarded,
like a file with ".html",
as a HTML file except that it includes special tags for
Server Side Include (SSI) and META which are to be
interpreted and substituted by the HTTP-DeleGate
before it is sent to a client.
SSI tags
- <!--#echo var="varName" -->
-
will be substituted with the value specified by varName.
varName can be arbitrary CGI compatible name like
"REMOTE_HOST" or "HTTP_SERVER",
as well as followings.
- DATE_GMT -- current time in GMT
- DATE_LOCAL -- current time local to the server host
- LAST_MODIFIED -- the last modified time of the .shtml file
- REFERER -- equiv. to HTTP_REFERER
- DOCUMENT_NAME -- equiv. to SCRIPT_NAME
- DOCUMENT_URI -- equiv. to REQUEST_URI
- * -- all of variables as name=value pairs
- <!--#include virtual="URL" -->
-
will be substituted with the data specified by "virtual" attribute.
"virtual" can be full URL like "proto://server/upath"
or partial URL like "/upath" which will be interpreted
as http://delegate/upath.
Relative URLs like "upath" without leading "/"
are interpreted as relative to the base (current) shtml file.
- <!--#fsize virtual="URL" -->
- <!--#flastmod virtual="URL" -->
-
will be substituted with the size or the last modified time
of the specified data respectively.
- <!--#config timefmt=timeFormat -->
-
will specify the format of generated time string by "#echo","#flastmod"
or so, in strftime(3) compatible format.
(default: timefmt="%a, %d %b %Y %H:%M:%S %z")
META tags
- <META HTTP-EQUIV=fieldName content="fieldBody">
-
will generate "fieldName: fieldBody" header
in the HTTP response message.
The following patterns in fileBody will be substituted
as described above.
- ${varName} or
<!--#echo var=varName -->
- ${flastmod:URL} or
<!--#flastmod virtual=URL -->
- ${fsize:URL} or
<!--#fsize virtual=URL -->
- ${include:URL} or
<!--#include virtual=URL -->
- Example:
- <META HTTP-EQUIV=Status content="200 OK">
- <META HTTP-EQUIV=Content-Type content="text/html">
- <META HTTP-EQUIV=Pragma content="no-cache">
- <META HTTP-EQUIV=Date content="${DATE_GMT}">
- <META HTTP-EQUIV=Last-Modified content="${flastmod:URL}">