mod_include.html revision c9aaa4cb1a852cad08fb47cf348f8c38332dc797
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews BGCOLOR="#FFFFFF"
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt TEXT="#000000"
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews LINK="#0000FF"
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt VLINK="#000080"
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt ALINK="#FF0000"
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!--#include virtual="header.html" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThis module is contained in the <CODE>mod_include.c</CODE> file, and
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntis compiled in by default. It provides for server-parsed html
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntdocuments. Several directives beyond the original NCSA definition were
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntintroduced in Apache 1.2 - these are flagged below with the phrase
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt"Apache 1.2 and above". Of particular significance are the new flow
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntcontrol directives documented at the bottom.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntAny document with handler of "server-parsed" will be parsed by this
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntmodule, if the <CODE>Includes</CODE> option is set. If documents
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntcontaining server-side include directives are given the extension
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt.shtml, the following directives will make Apache parse them and
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntassign the resulting document the mime type of <CODE>text/html</CODE>:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntAddHandler server-parsed .shtml
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe following directive must be given for the directories containing
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntthe shtml files (typically in a <CODE><Directory></CODE> section,
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntbut this directive is also valid .htaccess files if <CODE>AllowOverride
3d1b521b5be79913a020e373bf033657d4117d40Mark AndrewsOptions</CODE> is set):
3d1b521b5be79913a020e373bf033657d4117d40Mark AndrewsOptions +Includes
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark AndrewsAlternatively the <A HREF="#xbithack"><CODE>XBitHack</CODE></A>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntdirective can be used to parse normal (<CODE>text/html</CODE>) files,
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntbased on file permissions. <P>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntFor backwards compatibility, documents with mime type
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>text/x-server-parsed-html3</CODE> will also be parsed
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt(and the resulting output given the mime type <CODE>text/html</CODE>).
2616416a677634e01cea98a07d45c305cce8274aMark AndrewsThe document is parsed as an HTML document, with special commands embedded
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntas SGML comments. A command has the syntax:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!--#</CODE><EM>element attribute=value attribute=value ...</EM>
2be9d18ee9bd1b4eec4720218e4f43352603291fMark Andrews<CODE> -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe value will often be enclosed in double quotes; many commands only allow
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunta single attribute-value pair. Note that the comment terminator
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt(<SAMP>--></SAMP>) should be preceded by whitespace to ensure that it
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntisn't considered part of an SSI token.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe allowed elements are:<P>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThis command controls various aspects of the parsing. The valid attributes
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The value is a message that is sent back to the client if an error occurs
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntwhilst parsing the document.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The value sets the format to be used which displaying the size of a file.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntValid values are <CODE>bytes</CODE> for a count in bytes, or
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>abbrev</CODE> for a count in Kb or Mb as appropriate.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The value is a string to be used by the <CODE>strftime(3)</CODE> library
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntroutine when printing dates.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThis command prints one of the include variables, defined below.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntIf the variable is unset, it is printed as <CODE>(none)</CODE>.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntAny dates printed are subject to the currently configured <CODE>timefmt</CODE>.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The value is the name of the variable to print.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>Specifies how Apache should encode special characters contained
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntin the variable before outputting them. If set to "none", no encoding
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntwill be done. If set to "url", then URL encoding (also known as
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt%-encoding; this is appropriate for use within URLs in links, etc.)
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntwill be performed. At the start of an <CODE>echo</CODE> element,
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntthe default is set to "entity", resulting in entity encoding (which
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntis appropriate in the context of a block-level HTML element, eg.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunta paragraph of text). This can be changed by adding an
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>encoding</CODE> attribute, which will remain in effect until
2be9d18ee9bd1b4eec4720218e4f43352603291fMark Andrewsthe next <CODE>encoding</CODE> attribute is encountered or the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntelement ends, whichever comes first. Note that the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>encoding</CODE> attribute must <EM>precede</EM> the corresponding
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>var</CODE> attribute to be effective, and that only special
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntcharacters as defined in the ISO-8859-1 character encoding will be
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntencoded. This encoding process may not have the desired result if
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunta different character encoding is in use.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntApache 1.3.12 and above; previous versions do no encoding.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe exec command executes a given shell command or CGI script.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe IncludesNOEXEC <A HREF="core.html#options">Option</A> disables this command
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntcompletely. The valid attributes are:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe value specifies a (%-encoded) URL relative path to the CGI script.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntIf the path does not begin with a (/), then it is taken to be relative to
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntthe current document. The document referenced by this path is invoked
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntas a CGI script, even if the server would not normally recognize it as
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrewssuch. However, the directory containing the script must be enabled for
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntCGI scripts (with <A HREF="mod_alias.html#scriptalias">ScriptAlias</A>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntor the ExecCGI <A HREF="core.html#options">Option</A>).<P>
86f221492f6f6b71c1114e3edba7373aa93d906bMark AndrewsThe CGI script is given the PATH_INFO and query string (QUERY_STRING) of the
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrewsoriginal request from the client; these cannot be specified in the URL path.
86f221492f6f6b71c1114e3edba7373aa93d906bMark AndrewsThe include variables will be available to the script in addition to the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntstandard <A HREF="mod_cgi.html">CGI</A> environment.<P>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntIf the script returns a Location: header instead of output, then this
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntwill be translated into an HTML anchor.<P>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe <CODE>include virtual</CODE> element should be used in preference to
bfe9697f924fb22dbf9777a2a0bf91e7141e999eEvan Hunt<DD>The server will execute the given string using <CODE>/bin/sh</CODE>.
bfe9697f924fb22dbf9777a2a0bf91e7141e999eEvan HuntThe include variables are available to the command.
bfe9697f924fb22dbf9777a2a0bf91e7141e999eEvan HuntThis command prints the size of the specified file, subject to the
bfe9697f924fb22dbf9777a2a0bf91e7141e999eEvan Hunt<CODE>sizefmt</CODE> format specification. Attributes:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The value is a path relative to the directory containing the current
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntdocument being parsed.
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DD>The value is a (%-encoded) URL-path relative to the current document being
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntparsed. If it does not begin with a slash (/) then it is taken to be relative
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntto the current document.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThis command prints the last modification date of the specified file,
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntsubject to the <CODE>timefmt</CODE> format specification. The attributes are
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThis command inserts the text of another document or file into the parsed
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntfile. Any included file is subject to the usual access control. If the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntdirectory containing the parsed file has the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntIncludesNOEXEC set, and the including the document would cause a program
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntto be executed, then it will not be included; this prevents the execution of
86f221492f6f6b71c1114e3edba7373aa93d906bMark AndrewsCGI scripts. Otherwise CGI scripts are invoked as normal using the complete
86f221492f6f6b71c1114e3edba7373aa93d906bMark AndrewsURL given in the command, including any query string.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!--%plaintext <?INDEX CGI scripts, {\tt include} element and> -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntAn attribute defines the location of the document; the inclusion is done for
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewseach attribute given to the include command. The valid attributes are:
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews<DD>The value is a path relative to the directory containing the current
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsdocument being parsed. It cannot contain <CODE>../</CODE>, nor can it be an
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsabsolute path. The <CODE>virtual</CODE> attribute should always be used
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsin preference to this one.
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrews<DD>The value is a (%-encoded) URL relative to the current document being
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsparsed. The URL cannot contain a scheme or hostname, only a path and
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsan optional query string. If it does not begin with a slash (/) then it
c1a72112b2391bd8f149c5f19bdb12fa0d39fef4Mark Andrewsis taken to be relative to the current document.
3d1b521b5be79913a020e373bf033657d4117d40Mark AndrewsA URL is constructed from the attribute, and the output the server
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntwould return if the URL were accessed by the client is included in the parsed
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntoutput. Thus included files can be nested.
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DD>This prints out a listing of all existing variables and their values.
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews Starting with Apache 1.3.12, special characters are entity encoded (see the
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews <A HREF="#echo"><CODE>echo</CODE></A> element for details) before being
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrews output. No attributes.
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrews<DD>For example: <CODE><!--#printenv --></CODE>
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrews<DD>Apache 1.2 and above.
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrews<DD>This sets the value of a variable. Attributes:
3d1b521b5be79913a020e373bf033657d4117d40Mark Andrews<DD>The name of the variable to set.
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DD>The value to give a variable.
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews <CODE><!--#set var="category" value="help" --></CODE>
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DD>Apache 1.2 and above.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntIn addition to the variables in the standard CGI environment, these are
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Huntavailable for the <CODE>echo</CODE> command, for <CODE>if</CODE> and
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<CODE>elif</CODE>, and to any program invoked by the document.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The current date in Greenwich Mean Time.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DT>DATE_LOCAL
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>The current date in the local time zone.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DT>DOCUMENT_NAME
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<DD>The filename (excluding directories) of the document requested by the
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<DT>DOCUMENT_URI
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<DD>The (%-decoded) URL path of the document requested by the user. Note that
2616416a677634e01cea98a07d45c305cce8274aMark Andrewsin the case of nested include files, this is <EM>not</EM> then URL for the
2616416a677634e01cea98a07d45c305cce8274aMark Andrewscurrent document.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<DT>LAST_MODIFIED
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<DD>The last modification date of the document requested by the user.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> Variable substitution is done within quoted strings in most cases
2616416a677634e01cea98a07d45c305cce8274aMark Andrews where they may reasonably occur as an argument to an SSI directive.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews This includes the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt directives, as well as the arguments to conditional operators.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews You can insert a literal dollar sign into the string using backslash
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#if expr="$a = \$test" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<P> If a variable reference needs to be substituted in the middle of a
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt character sequence that might otherwise be considered a valid
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt identifier in its own right, it can be disambiguated by enclosing
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt the reference in braces, <EM>à la</EM> shell substitution:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> This will result in the <SAMP>Zed</SAMP> variable being set to
2616416a677634e01cea98a07d45c305cce8274aMark Andrews "<SAMP>X_Y</SAMP>" if <SAMP>REMOTE_HOST</SAMP> is
2616416a677634e01cea98a07d45c305cce8274aMark Andrews "<SAMP>X</SAMP>" and <SAMP>REQUEST_METHOD</SAMP> is
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<P> EXAMPLE: the below example will print "in foo" if the DOCUMENT_URI is
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt/foo/file.html, "in bar" if it is /bar/file.html and "in neither"
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#else -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#endif -->
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<H2><A NAME="flowctrl">Flow Control Elements</A></H2>
86f221492f6f6b71c1114e3edba7373aa93d906bMark AndrewsThese are available in Apache 1.2 and above. The basic flow control
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrewselements are:
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <!--#if expr="<EM>test_condition</EM>" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#elif expr="<EM>test_condition</EM>" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#else -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#endif -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> The <STRONG><CODE>if</CODE></STRONG> element works like an
2616416a677634e01cea98a07d45c305cce8274aMark Andrews if statement in a programming language. The test condition
2616416a677634e01cea98a07d45c305cce8274aMark Andrews is evaluated and if the result is true, then the text until
2616416a677634e01cea98a07d45c305cce8274aMark Andrews the next <STRONG><CODE>elif</CODE></STRONG>, <STRONG><CODE>else</CODE></STRONG>.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews or <STRONG><CODE>endif</CODE></STRONG> element is included in the
2616416a677634e01cea98a07d45c305cce8274aMark Andrews output stream.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> The <STRONG><CODE>elif</CODE></STRONG> or <STRONG><CODE>else</CODE></STRONG>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt statements are be used the put text into the output stream
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt if the original test_condition was false. These elements
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt are optional.
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<P> The <STRONG><CODE>endif</CODE></STRONG> element ends the
2616416a677634e01cea98a07d45c305cce8274aMark Andrews <STRONG><CODE>if</CODE></STRONG> element and is required.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> <EM>test_condition</EM> is one of the following:
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DT><EM>string</EM><DD>true if <EM>string</EM> is not empty
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DD>Compare string1 with string 2. If string2 has the form <EM>/string/</EM>
2616416a677634e01cea98a07d45c305cce8274aMark Andrews then it is compared as a regular expression.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews Regular expressions have the same syntax as those found in the
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<DT><EM>test_condition1</EM> && <EM>test_condition2</EM>
86f221492f6f6b71c1114e3edba7373aa93d906bMark Andrews<DT><EM>test_condition1</EM> || <EM>test_condition2</EM>
2616416a677634e01cea98a07d45c305cce8274aMark Andrews<P> "<EM>=</EM>" and "<EM>!=</EM>" bind more tightly than "<EM>&&</EM>" and
2616416a677634e01cea98a07d45c305cce8274aMark Andrews "<EM>!</EM>" binds most tightly. Thus, the following are equivalent:
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#if expr="$a = test1 && $b = test2" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <!--#if expr="($a = test1) && ($b = test2)" -->
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<P> Anything that's not recognized as a variable or an operator is
2616416a677634e01cea98a07d45c305cce8274aMark Andrews treated as a string. Strings can also be quoted: <EM>'string'</EM>.
2616416a677634e01cea98a07d45c305cce8274aMark Andrews Unquoted strings can't contain whitespace (blanks and tabs)
2616416a677634e01cea98a07d45c305cce8274aMark Andrews because it is used to separate tokens such as variables. If
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt multiple strings are found in a row, they are concatenated using
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <EM>string1 string2</EM> results in <EM>string1 string2</EM>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt <EM>'string1 string2'</EM> results in <EM>string1 string2</EM>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt<!--%plaintext <?INDEX {\tt XBitHack} directive> -->
2616416a677634e01cea98a07d45c305cce8274aMark Andrews><STRONG>Syntax:</STRONG></A> XBitHack <EM>status</EM><BR>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt><STRONG>Default:</STRONG></A> <CODE>XBitHack off</CODE><BR>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan Hunt HREF="directive-dict.html#Override"
f6096b958c8b58c4709860d7c4dcdde5deeacb7aEvan HuntThe XBitHack directives controls the parsing of ordinary html documents.
<!--#include virtual="footer.html" -->