Apache The Definitive Guide, 3rd EditionApache: The Definitive GuideSearch this book

14.6. Apache v2: SSI Filters

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.

Example

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.

Example

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).

Example

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.

Example

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."

Example

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:

off
This offers no special treatment of executable files.

on
Any text/html file that has the user-execute bit set will be treated as a server-parsed HTML document.

full
As for on but also test the group-execute bit. If it is set, then set the Last-modified date of the returned file to be the last modified time of the file. If it is not set, then no last-modified date is sent. Setting this bit allows clients and proxies to cache the result of the request.

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:



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.