Module mod_include

Important: Information for this topic supports the latest PTF levels for HTTP Server for i5/OS . It is recommended that you install the latest PTFs to upgrade to the latest level of the HTTP Server for i5/OS. Some of the topics documented here are not available prior to this update. See http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm Link outside Information Center for more information.

Summary

The module mod_include provides for server-parsed html documents.

Note: A configuration change is required in order for mod_include to work correctly. Previously, mod_include was a handler, and the config file had a AddHandler server-parsed .htmls directive in order to define mod_include as a handler for extensions of .htmls. mod_include is now a filter. Thus, the AddHandler directive no longer applies. Directive AddOutputFilter must be used and associated with a file extension, much like directive AddHandler. For example:
AddOutputFilter INCLUDES .shtml

Enabling Server-Side Includes

Server-Side Includes (SSI) are implemented by the INCLUDES filter. If documents containing SSI directives are given the extension .shtml, the following directives makes the HTTP Server parse and assign the resulting documents as MIME type text/html. For example:

AddType text/html .shtml
AddOutputFilter INCLUDE .sthml

The following directive must be given for the directories containing the shtml files (typically in a <Directory> section, but this directive is also valid .htaccess files if AllowOverride Options is set). For example:

Options +Includes

See the Options directive for more information.

Note: The iSeries™ system does not support XBitHack to enable server-side includes.

Directives

SSIEndTag

Module: mod_include
Syntax: SSIEndTag string
Default: SSIEndTag "-->"
Context: server config, virtual host
Override: none
Origin: Apache
Example: SSIEndTag "-->"

The SSIEndTag directive changes the string that mod_include looks for to mark the end of a include command.

Parameter: string
  • The string parameter represents the string that mod_include looks for to mark the end of a include command.

SSIErrorMsg

Module: mod_include
Syntax: SSIErrorMsg string
Default: SSIErrorMsg "[an error occurred while processing this directive]"
Context: server config, virtual host, directory, .htaccess
Override: none
Origin: Apache
Example: SSIErrorMsg "This is the default error message"

This SSIErrorMsg directive defines the default error message that is used when an error is encountered while processing SSI tags in a file. This configuration directive can be used instead of the config errmsg SSI tag.

Parameter: string
  • The string parameter defines the default error message that is used when an error is encountered while processing SSI tags in a file. For example:
    SSIErrorMsg "This is the default error message"

SSIStartTag

Module: mod_include
Syntax: SSIStartTag string
Default: SSIStartTab "<!--#"
Context: server config, virtual host
Override: none
Origin: Apache
Example: SSIStartTab "<!--#"

The SSIEndTag directive changes the string that mod_include looks for to mark an include element to process. You may want to use this option if have 2 servers parsing the output of a file (each processing different commands, possibly at different times).

Parameter: string
  • The string parameter represents the string that mod_include looks for to mark an include element to process.

SSITimeFormat

Module: mod_include
Syntax: SSITimeFormat strftime string
Default: SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"
Context: server config, virtual host, directory, .htaccess
Override: none
Origin: Apache
Example: SSITimeFormat "%H:%M:%S %m-%d-%y"

The SSITimeFormat directive defines the default dates/times format that are returned to the browser while processing SSI tags. This configuration directive can be used instead of the config timefmt SSI tag.

Parameter: strftime string
  • The strftime string parameter defines the default dates/times format that are returned to the browser while processing SSI tags. For example,
    SSITimeFormat "%H:%M:%S %m-%d-%y"

See Server-side include commands for HTTP Server for a list of supported server-side include directives.

Note: HTTP Server (powered by Apache) does not support the %Z (time zone) format.

SSIUndefinedEcho

Module: mod_include
Syntax: SSIUndefinedEcho string
Default: SSIUndefinedEcho "(none)"
Context: server config, virtual host
Override: none
Origin: Apache
Example: SSIUndefinedEcho "The value on an SSI Echo request is not defined"

The SSIUndefinedEcho directive is used to define the default message that is used when an "echo" SSI tag is requesting a variable whose value has not been set.

Parameter: string
  • The string parameter defines the default message that is used when an "echo" SSI tag is requesting a variable whose value has not been set.