Server Side Includes Server side
includes (SSI) allows the insertion of dynamic data into
.html documents. OmniHTTPd does all of its SSI processing
in-memory and sends the correct Content-Length header
value.
Security Note on Using SSI
File-based and absolute referencing is considered
insecure, especially if you allow users to upload web
documents to your site. Under NT, the SSI parser uses the
web server security identity when accessing these files.
You can disable the use of the cmd and file tags
by going into the Advanced section of the server
properties and clicking "Disable Insecure SSI".
The following commands are support under this
implementation:
#config
Configures the SSI environment. The environment is
reset for each SSI document. You can configure the
error message, the size format and the time format.
#echo
Inserts the value of a variable. Supported
environment variables include:
DOCUMENT_NAME
DOCUMENT_URI
QUERY_STRING_UNESCAPED
DATE_LOCAL
DATE_GMT
LAST_MODIFIED
SERVER_SOFTWARE
SERVER_NAME
GATEWAY_INTERFACE
SERVER_PROTOCOL
SERVER_PORT
REQUEST_METHOD
PATH_INFO
PATH_TRANSLATED
SCRIPT_NAME
QUERY_STRING
REMOTE_HOST
REMOTE_ADDR
AUTH_TYPE
REMOTE_USER
REMOTE_IDENT
CONTENT_TYPE
CONTENT_LENGTH
For example, the following line will insert the
current time and date:
<!--#echo var="DATE_LOCAL"-->
#exec
Executes a program and inserts its output into the
document. Use the cgi keyword for URL-based scripts
and the cmd keyword for system commands. Example
usage:
<!--#exec
cgi="/cgi-bin/yoda.exe"-->
<!--#exec
cmd="c:\mystuff\jedi.exe"-->
#flastmod
Returns the date of the last modification to the
specified file. Use the virtual keyword for URL-based
files and the file keyword for path based files.
Example usage:
<!--#flastmod
virtual="stuff/extra.txt"-->
<!--#flastmod
file="c:\mystuff\extra.txt"-->
#fsize
Inserts the size of a file. Use the virtual
keyword for URL-based files and the file keyword for
path based files. Example usage:
<!--#fsize
virtual="stuff/extra.txt"-->
<!--#fsize
file="c:\mystuff\extra.txt"-->
#include
Inserts a file into the document. You may nest
documents up to 8 layers. Use the virtual keyword for
URL-based includes and the file keyword for path
based includes. Example usage:
<!--#include
virtual="stuff/extra.txt"-->
<!--#include
file="c:\mystuff\extra.txt"-->
Copyright © 1998 Omnicron Technologies Corporation
|