mod_include.html revision eaa303ef275e283ee18a4b5248e304ef1ed7c185
208651a016b098f4fa1f6279559f104d70f1632dtakashi<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
031b91a62d25106ae69d4693475c79618dd5e884fielding<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
031b91a62d25106ae69d4693475c79618dd5e884fielding BGCOLOR="#FFFFFF"
031b91a62d25106ae69d4693475c79618dd5e884fielding TEXT="#000000"
031b91a62d25106ae69d4693475c79618dd5e884fielding LINK="#0000FF"
031b91a62d25106ae69d4693475c79618dd5e884fielding VLINK="#000080"
79b5ea592535186594ff19441a398acfc95704abyoshiki ALINK="#FF0000"
79b5ea592535186594ff19441a398acfc95704abyoshiki<!--#include virtual="header.html" -->
79b5ea592535186594ff19441a398acfc95704abyoshikiThis document has not been updated to take into account changes
79b5ea592535186594ff19441a398acfc95704abyoshikimade in the 2.0 version of the Apache HTTP Server. Some of the
79b5ea592535186594ff19441a398acfc95704abyoshikiinformation may still be relevant, but please use it
79b5ea592535186594ff19441a398acfc95704abyoshiki</blockquote>
208651a016b098f4fa1f6279559f104d70f1632dtakashi<p>This module provides for server-parsed html documents.</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashiHREF="module-dict.html#SourceFile"
79b5ea592535186594ff19441a398acfc95704abyoshikiHREF="module-dict.html#ModuleIdentifier"
208651a016b098f4fa1f6279559f104d70f1632dtakashi><STRONG>Module Identifier:</STRONG></A> includes_module
79b5ea592535186594ff19441a398acfc95704abyoshiki<p>This module provides a handler which will process files before they
208651a016b098f4fa1f6279559f104d70f1632dtakashiare sent to the client. The processing is controlled by specially
208651a016b098f4fa1f6279559f104d70f1632dtakashiformated SGML comments, referred to as <em>elements</em>. These
208651a016b098f4fa1f6279559f104d70f1632dtakashielements allow conditional text, the inclusion other files or
79b5ea592535186594ff19441a398acfc95704abyoshikiprograms, as well as the setting and printing of environment
208651a016b098f4fa1f6279559f104d70f1632dtakashivariables.</p>
79b5ea592535186594ff19441a398acfc95704abyoshikiand <a href="mod_mime.html#addhandler">AddHandler</a>.</p>
208651a016b098f4fa1f6279559f104d70f1632dtakashiAny document with handler of "server-parsed" will be parsed by this
208651a016b098f4fa1f6279559f104d70f1632dtakashimodule, if the <CODE>Includes</CODE> option is set. If documents
79b5ea592535186594ff19441a398acfc95704abyoshikicontaining server-side include directives are given the extension
208651a016b098f4fa1f6279559f104d70f1632dtakashi.shtml, the following directives will make Apache parse them and
208651a016b098f4fa1f6279559f104d70f1632dtakashiassign the resulting document the mime type of <CODE>text/html</CODE>:
79b5ea592535186594ff19441a398acfc95704abyoshikiAddHandler server-parsed .shtml
79b5ea592535186594ff19441a398acfc95704abyoshikiThe following directive must be given for the directories containing
79b5ea592535186594ff19441a398acfc95704abyoshikithe shtml files (typically in a <CODE><Directory></CODE> section,
79b5ea592535186594ff19441a398acfc95704abyoshikibut this directive is also valid .htaccess files if <CODE>AllowOverride
208651a016b098f4fa1f6279559f104d70f1632dtakashiOptions</CODE> is set):
79b5ea592535186594ff19441a398acfc95704abyoshikiOptions +Includes
79b5ea592535186594ff19441a398acfc95704abyoshikiAlternatively the <A HREF="#xbithack"><CODE>XBitHack</CODE></A>
208651a016b098f4fa1f6279559f104d70f1632dtakashidirective can be used to parse normal (<CODE>text/html</CODE>) files,
208651a016b098f4fa1f6279559f104d70f1632dtakashibased on file permissions. <P>
79b5ea592535186594ff19441a398acfc95704abyoshikiFor backwards compatibility, documents with mime type
208651a016b098f4fa1f6279559f104d70f1632dtakashi<CODE>text/x-server-parsed-html3</CODE> will also be parsed
208651a016b098f4fa1f6279559f104d70f1632dtakashi(and the resulting output given the mime type <CODE>text/html</CODE>).
208651a016b098f4fa1f6279559f104d70f1632dtakashiThe document is parsed as an HTML document, with special commands embedded
79b5ea592535186594ff19441a398acfc95704abyoshikias SGML comments. A command has the syntax:
79b5ea592535186594ff19441a398acfc95704abyoshiki<!--#</CODE><EM>element attribute=value attribute=value ...</EM>
208651a016b098f4fa1f6279559f104d70f1632dtakashi<CODE> -->
79b5ea592535186594ff19441a398acfc95704abyoshikiThe value will often be enclosed in double quotes; many commands only allow
79b5ea592535186594ff19441a398acfc95704abyoshikia single attribute-value pair. Note that the comment terminator
79b5ea592535186594ff19441a398acfc95704abyoshiki(<SAMP>--></SAMP>) should be preceded by whitespace to ensure that it
208651a016b098f4fa1f6279559f104d70f1632dtakashiisn't considered part of an SSI token.
208651a016b098f4fa1f6279559f104d70f1632dtakashiThe allowed elements are:<P>
208651a016b098f4fa1f6279559f104d70f1632dtakashiThis command controls various aspects of the parsing. The valid attributes
79b5ea592535186594ff19441a398acfc95704abyoshiki<DD>The value is a message that is sent back to the client if an error occurs
79b5ea592535186594ff19441a398acfc95704abyoshikiwhilst parsing the document.
208651a016b098f4fa1f6279559f104d70f1632dtakashi<DD>The value sets the format to be used which displaying the size of a file.
208651a016b098f4fa1f6279559f104d70f1632dtakashiValid values are <CODE>bytes</CODE> for a count in bytes, or
79b5ea592535186594ff19441a398acfc95704abyoshiki<CODE>abbrev</CODE> for a count in Kb or Mb as appropriate.
208651a016b098f4fa1f6279559f104d70f1632dtakashi<DD>The value is a string to be used by the <CODE>strftime(3)</CODE> library
208651a016b098f4fa1f6279559f104d70f1632dtakashiroutine when printing dates.
208651a016b098f4fa1f6279559f104d70f1632dtakashiThis command prints one of the include variables, defined below.
208651a016b098f4fa1f6279559f104d70f1632dtakashiIf the variable is unset, it is printed as <CODE>(none)</CODE>.
208651a016b098f4fa1f6279559f104d70f1632dtakashiAny dates printed are subject to the currently configured <CODE>timefmt</CODE>.
208651a016b098f4fa1f6279559f104d70f1632dtakashi<DD>The value is the name of the variable to print.
208651a016b098f4fa1f6279559f104d70f1632dtakashi<DT>encoding
208651a016b098f4fa1f6279559f104d70f1632dtakashi<DD>Specifies how Apache should encode special characters contained
208651a016b098f4fa1f6279559f104d70f1632dtakashiin the variable before outputting them. If set to "none", no encoding
208651a016b098f4fa1f6279559f104d70f1632dtakashiwill be done. If set to "url", then URL encoding (also known as
79b5ea592535186594ff19441a398acfc95704abyoshiki%-encoding; this is appropriate for use within URLs in links, etc.)
79b5ea592535186594ff19441a398acfc95704abyoshikiwill be performed. At the start of an <CODE>echo</CODE> element,
79b5ea592535186594ff19441a398acfc95704abyoshikithe default is set to "entity", resulting in entity encoding (which
79b5ea592535186594ff19441a398acfc95704abyoshikiis appropriate in the context of a block-level HTML element, eg.
79b5ea592535186594ff19441a398acfc95704abyoshikia paragraph of text). This can be changed by adding an
79b5ea592535186594ff19441a398acfc95704abyoshiki<CODE>encoding</CODE> attribute, which will remain in effect until
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Default"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Override"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
<!--#include virtual="footer.html" -->