httpd.apache.org/docs/mod/mod_include.html
Any dates printed are subject to the currently configured timefmt. Attributes: var The value is the name of the variable to print. If set to "url", then URL encoding (also known as %-encoding; At the start of an echo element, the default is set to "entity", resulting in entity encoding (which is appropriate in the context of a block-level HTML element, eg. This can be changed by adding an encoding attribute, which will remain in effect until the next encoding attribute is encountered or the element ends, whichever comes first. Note that the encoding attribute must precede the corresponding var attribute to be effective, and that only special characters as defined in the ISO-8859-1 character encoding will be encoded. This encoding process may not have the desired result if a different character encoding is in use. The IncludesNOEXEC 10 Option disables this command completely. The valid attributes are: cgi The value specifies a (%-encoded) URL relative path to the CGI script. If the path does not begin with a , then it is taken to be relative to the current document. The document referenced by this path is invoked as a CGI script, even if the server would not normally recognize it as such. However, the directory containing the script must be enabled for CGI scripts (with 11 ScriptAlias or the ExecCGI 12 Option). The CGI script is given the PATH_INFO and query string (QUERY_STRING) of the original request from the client; The include variables will be available to the script in addition to the standard 13 CGI environment. The 14 include virtual element should be used in preference to exec cgi. The 15 include variables are available to the command, in addition to the usual set of CGI variables. The use of 16 #include virtual is almost always prefered to using either #exec cgi or #exec cmd. The former (#include virtual) used the standard Apache sub-request mechanism to include files or scripts. In addition, on some platforms, like Win32, and on unix when using suexec, you cannot pass arguments to a command in an exec directive, or otherwise include spaces in the command. Attributes: file The value is a path relative to the directory containing the current document being parsed. If it does not begin with a slash then it is taken to be relative to the current document. Any included file is subject to the usual access control. If the directory containing the parsed file has the 17 Option IncludesNOEXEC set, and the including the document would cause a program to be executed, then it will not be included; Otherwise CGI scripts are invoked as normal using the complete URL given in the command, including any query string. The valid attributes are: file The value is a path relative to the directory containing the current document being parsed. Therefore, you cannot include files that are outside of the document root, or above the current document in the directory structure. The virtual attribute should always be used in preference to this one. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash then it is taken to be relative to the current document. A URL is constructed from the attribute, and the output the server would return if the URL were accessed by the client is included in the parsed output. If the specified URL is a CGI program, the program will be executed and its output inserted in place of the directive in the parsed file. Include Variables In addition to the variables in the standard CGI environment, these are available for the echo command, for if and elif, and to any program invoked by the document. DOCUMENT_NAME The filename (excluding directories) of the document requested by the user. DOCUMENT_URI The (%-decoded) URL path of the document requested by the user. Note that in the case of nested include files, this is not then URL for the current document. LAST_MODIFIED The last modification date of the document requested by the user. USER_NAME Contains the owner of the file which included it. Variable Substitution Variable substitution is done within quoted strings in most cases where they may reasonably occur as an argument to an SSI directive. This includes the config, exec, flastmod, fsize, include, and set directives, as well as the arguments to conditional operators. The test condition is evaluated and if the result is true, then the text until the next elif, else. The elif or else statements are be used the put text into the output stream if the original test_condition was false. If string2 has the form /string/ then it is compared as a regular expression. Regular expressions have the same syntax as those found in the Unix egrep command. Unquoted strings can't contain whitespace (blanks and tabs) because it is used to separate tokens such as variables. If multiple strings are found in a row, they are concatenated using blanks. So, string1 string2 results in string1 string2 'string1 string2' results in string1 string2 Using Server Side Includes for ErrorDocuments There is 19 a document which describes how to use the features of mod_include to offer internationalized customized server error documents. This directive only affects files associated with the MIME type text/html. XBitHack can take on the following values: off No special treatment of executable files. If it is set, then set the Last-modified date of the returned file to be the last modified time of the file. Setting this bit allows clients and proxies to cache the result of the request. Note: you would not want to use this, for example, when you #include a CGI that produces different output on each hit (or potentially depends on the hit).
|