Summary
The module mod_include provides for server-parsed html documents.
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.
Directives
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.
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.
SSIErrorMsg "This is the default error message"
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).
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.
SSITimeFormat "%H:%M:%S %m-%d-%y"
See Server-side include commands for HTTP Server for a list of supported server-side include directives.
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.