Apache v2, with its filter mechanism, introduced some new SSI directives:
SSIEndTag |
SSIEndTag tag Default: SSIEndTag " -- >" Context: Server config, virtual host
This directive changes the string that mod_include looks for to mark the end of an include element.
SSIEndTag "%>"
See also SSIStartTag.
SSIErrorMsg |
SSIErrorMsg message Default: SSIErrorMsg "[an error occurred while processing this directive]" Context: Server config, virtual host, directory, .htaccess
The SSIErrorMsg directive changes the error message displayed when mod_include encounters an error. For production servers you may consider changing the default error message to "<!-- Error -->" so that the message is not presented to the user. This directive has the same effect as the <!--#config errmsg="message" --> element.
SSIErrorMsg "<!-- Error -->"
SSIStartTag |
SSIStartTag message Default: SSIStartTag "<! -- " Context: Server config, virtual host
This directive changes the string that mod_include looks for to mark an include element to process. You may want to use this option if you have two servers parsing the output of a file each processing different commands (possibly at different times).
SSIStartTag "<%"
This example, in conjunction with a matching SSIEndTag, will allow you to use SSI directives as shown in the following example (SSI directives with alternate start and end tags):
<%#printenv %>
See also SSIEndTag.
SSITimeFormat |
SSITimeFormat formatstring Default: SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z" Context: Server config, virtual host, directory, .htaccess
This directive changes the format in which date strings are displayed when echoing DATE environment variables. The formatstring is as in strftime(3) from the C standard library.
This directive has the same effect as the <!--#config timefmt="formatstring" --> element.
SSITimeFormat "%R, %B %d, %Y"
The previous directive would cause times to be displayed in the format "22:26, June 14, 2002".
SSIUndefinedEcho |
SSIUndefinedEcho tag Default: SSIUndefinedEcho "<! -- undef -- >" Context: Server config, virtual host
This directive changes the string that mod_include displays when a variable is not set and "echoed."
SSIUndefinedEcho "[ No Value ]"
XBitHack |
XBitHack on|off|full Default: XBitHack off Context: Server config, virtual host, directory, .htaccess
The XBitHack directive controls the parsing of ordinary HTML documents. This directive only affects files associated with the MIME type text/html. XBitHack can take on the following values:
TIP: You would not want to use the full option unless you assure the group-execute bit is unset for every SSI script that might include a CGI or otherwise produces different output on each hit (or could potentially change on subsequent requests).
XSSI |
This is an extension of the standard SSI commands available in the XSSI module, which became a standard part of the Apache distribution in Version 1.2. XSSI adds the following abilities to the standard SSI:
XSSI allows variables in any SSI commands. For example, the last modification time of the current document could be obtained with the following:
<tt><!--#flastmod file="$DOCUMENT_NAME" -->
The set command sets variables within the SSI.
The SSI commands if, else, elif, and endif are used to include parts of the file based on conditional tests. For example, the $HTTP_USER_AGENT variable could be tested to see the type of browser and produce different HTML output depending on the browser capabilities.
Copyright © 2003 O'Reilly & Associates. All rights reserved.