mod_setenvif.html revision ac6d1ce7ccb1950bb2145a5c2c3498235353bcb0
8a77240a809197c92c0736c431b4b88947a7bac1Christian Maeder<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
d9a45a35cd696085be1a038b2cc67bee6819c574cmaederXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8a77240a809197c92c0736c431b4b88947a7bac1Christian Maeder This file is generated from xml source: DO NOT EDIT
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian MaederXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner--><title>mod_setenvif - Apache HTTP Server</title><link href="/style/manual.css" type="text/css" rel="stylesheet"/></head><body><blockquote><div align="center"><img alt="[APACHE DOCUMENTATION]" src="/images/sub.gif"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_setenvif</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Allows the setting of environment variables based
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederon characteristics of the request</td></tr><tr><td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:</a></td><td>setenvif_module</td></tr><tr><td align="left" valign="top"><a href="module-dict.html#Compatibility" class="help">Compatibility:</a></td><td><compatibility>Available in Apache 1.3 and later</compatibility></td></tr></table></td></tr></table><h2>Summary</h2>
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu <p>The <code><a href="mod_setenvif.html">mod_setenvif</a></code> module allows you to set
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian Maeder environment variables according to whether different aspects of
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski the request match regular expressions you specify. These
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski environment variables can be used by other parts of the server
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder to make decisions about actions to be taken.</p>
0095c7efbddd0ffeed6aaf8ec015346be161d819Till Mossakowski <p>The directives are considered in the order they appear in
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder the configuration files. So more complex sequences can be used,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski such as this example, which sets <code>netscape</code> if the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski browser is mozilla but not MSIE.</p>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder BrowserMatch ^Mozilla netscape<br>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski BrowserMatch MSIE !netscape<br>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<h2>Directives</h2><ul><li><a href="#browsermatch">BrowserMatch</a></li><li><a href="#browsermatchnocase">BrowserMatchNoCase</a></li><li><a href="#setenvif">SetEnvIf</a></li><li><a href="#setenvifnocase">SetEnvIfNoCase</a></li></ul><p><strong>See also </strong></p><ul><li><a href="/env.html">Environment Variables in Apache</a></li></ul><hr/><h2><a name="BrowserMatch">BrowserMatch</a> <a name="browsermatch">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets environment variables conditional on HTTP User-Agent
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>BrowserMatch <em>regex env-variable</em>[=<em>value</em>]
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski[<em>env-variable</em>[=<em>value</em>]] ...</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_setenvif</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Apache 1.2 and
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski above (in Apache 1.2 this directive was found in the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski now-obsolete mod_browser module)</td></tr></table></td></tr></table>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>The <code class="directive">BrowserMatch</code> directive defines
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski environment variables based on the <code>User-Agent</code> HTTP
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder request header field. The first argument should be a POSIX.2
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder extended regular expression (similar to an
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder <code>egrep</code>-style regex). The rest of the arguments give
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder the names of variables to set, and optionally values to which they
d9a45a35cd696085be1a038b2cc67bee6819c574cmaeder should be set. These take the form of</p>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <li><code><em>varname</em>=<em>value</em></code></li>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>In the first form, the value will be set to "1". The second
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder will remove the given variable if already defined, and the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski third will set the variable to the value given by
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder <code><em>value</em></code>. If a <code>User-Agent</code>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder string matches more than one entry, they will be merged.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski Entries are processed in the order in which they appear, and
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder later entries can override earlier ones.</p>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder BrowserMatch ^Mozilla forms jpeg=yes browser=netscape<br>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript<br>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder BrowserMatch MSIE !javascript<br>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>Note that the regular expression string is
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder <strong>case-sensitive</strong>. For case-INsensitive matching,
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder see the <a href="#browsermatchnocase" class="directive"><code class="directive">BrowserMatchNoCase</code></a>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>The <code class="directive">BrowserMatch</code> and
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <code class="directive">BrowserMatchNoCase</code> directives are special cases of
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski the <a href="#setenvif" class="directive"><code class="directive">SetEnvIf</code></a> and <a href="#setenvifnocase" class="directive"><code class="directive">SetEnvIfNoCase</code></a>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski directives. The following two lines have the same effect:</p>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder BrowserMatchNoCase Robot is_a_robot<br>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder SetEnvIfNoCase User-Agent Robot is_a_robot<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder</code></td></tr></table></blockquote>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder<hr/><h2><a name="BrowserMatchNoCase">BrowserMatchNoCase</a> <a name="browsermatchnocase">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets environment variables conditional on User-Agent without
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederrespect to case</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>BrowserMatchNoCase <em>regex env-variable</em>[=<em>value</em>]
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder [<em>env-variable</em>[=<em>value</em>]] ...</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_setenvif</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Apache 1.2 and
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder above (in Apache 1.2 this directive was found in the
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder now-obsolete mod_browser module)</td></tr></table></td></tr></table>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>The <code class="directive">BrowserMatchNoCase</code> directive is
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski semantically identical to the <a href="#browsermatch" class="directive"><code class="directive">BrowserMatch</code></a> directive.
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski However, it provides for case-insensitive matching. For
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder BrowserMatchNoCase mac platform=macintosh<br>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder BrowserMatchNoCase win platform=windows<br>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder <p>The <code class="directive">BrowserMatch</code> and
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder <code class="directive">BrowserMatchNoCase</code> directives are special cases of
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder the <a href="#setenvif" class="directive"><code class="directive">SetEnvIf</code></a> and <a href="#setenvifnocase" class="directive"><code class="directive">SetEnvIfNoCase</code></a>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski directives. The following two lines have the same effect:</p>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski BrowserMatchNoCase Robot is_a_robot<br>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder SetEnvIfNoCase User-Agent Robot is_a_robot<br>
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder<hr/><h2><a name="SetEnvIf">SetEnvIf</a> <a name="setenvif">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets environment variables based on attributes of the request
4ef5e33657aae95850b7e6941f67ac1fb73cd13fChristian Maeder</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SetEnvIf <em>attribute
e7d2b3903c7b44db432538b0d720c21062c24823Christian Maeder [<em>env-variable</em>[=<em>value</em>]] ...</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_setenvif</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Apache 1.3 and
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski above; the Request_Protocol keyword and environment-variable
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski matching are only available with 1.3.7 and later</td></tr></table></td></tr></table>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>The <code class="directive">SetEnvIf</code> directive defines environment
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder variables based on attributes of the request. These attributes
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski can be the values of various HTTP request header fields (see <a href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC2616</a>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski for more information about these), or of other aspects of the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski request, including the following:</p>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <li><code>Remote_Host</code> - the hostname (if available) of
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder the client making the request</li>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <li><code>Remote_Addr</code> - the IP address of the client
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski making the request</li>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <li><code>Remote_User</code> - the authenticated username (if
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder available)</li>
a98fd29a06e80e447af26d898044c23497adbc73Mihai Codescu <li><code>Request_Method</code> - the name of the method
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski being used (<code>GET</code>, <code>POST</code>, <em>et
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder <li><code>Request_Protocol</code> - the name and version of
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski the protocol with which the request was made (<em>e.g.</em>,
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski "HTTP/0.9", "HTTP/1.1", <em>etc.</em>)</li>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder <li><code>Request_URI</code> - the portion of the URL
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski following the scheme and host portion</li>
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <p>Some of the more commonly used request header field names
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder include <code>Host</code>, <code>User-Agent</code>, and
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder <p>If the <em>attribute</em> name doesn't match any of the
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski special keywords, nor any of the request's header field names,
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder it is tested as the name of an environment variable in the list
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski of those associated with the request. This allows
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski <code class="directive">SetEnvIf</code> directives to test against the result of
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski prior matches.</p>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<blockquote><table><tr><td bgcolor="#e0e5f5">
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder <strong>Only those environment variables defined by earlier
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder <code>SetEnvIf[NoCase]</code> directives are available for
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder testing in this manner. 'Earlier' means that they were
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder defined at a broader scope (such as server-wide) or
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder previously in the current directive's scope.</strong>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder <p><em>attribute</em> may be a regular expression when used to
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder match a request header. If <em>attribute</em> is a regular
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder expression and it doesn't match any of the request's header
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder names, then <em>attribute</em> is not tested against the
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder request's environment variable list.</p>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example:</strong></p><code>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf Request_URI "\.gif$" object_is_image=gif<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf Request_URI "\.jpg$" object_is_image=jpg<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf Request_URI "\.xbm$" object_is_image=xbm<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf Referer www\.mydomain\.com intra_site_referral<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf object_is_image xbm XBIT_PROCESSING=1<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder SetEnvIf ^TS* ^[a-z].* HAVE_TS<br>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder</code></td></tr></table></blockquote>
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder <p>The first three will set the environment variable
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder <code>object_is_image</code> if the request was for an image
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder file, and the fourth sets <code>intra_site_referral</code> if
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder the referring page was somewhere on the
c911a0ec80ca4a178399c68f1e28be4e2bf42fceChristian Maeder <code>www.mydomain.com</code> Web site.</p>
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder <p>The last example will set environment variable
556f473448dfcceee22afaa89ed7a364489cdbbbChristian Maeder <code>HAVE_TS</code> if the request contains any headers that
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder begin with "TS" whose values begins with any character in the
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder set [a-z].</p>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<hr/><h2><a name="SetEnvIfNoCase">SetEnvIfNoCase</a> <a name="setenvifnocase">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets environment variables based on attributes of the request
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederwithout respect to case</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SetEnvIfNoCase <em>attribute regex env-variable</em>[=<em>value</em>]
c8117ae0b6088d835211e494aef229558c814bd3cmaeder [<em>env-variable</em>[=<em>value</em>]] ...</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>FileInfo</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_setenvif</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Apache 1.3 and above</td></tr></table></td></tr></table>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder <p>The <code class="directive">SetEnvIfNoCase</code> is semantically identical to
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder the <a href="#setenvif" class="directive"><code class="directive">SetEnvIf</code></a> directive,
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder and differs only in that the regular expression matching is
c8117ae0b6088d835211e494aef229558c814bd3cmaeder performed in a case-insensitive manner. For example:</p>
a65c6747c9acbbebc93baba7bae94d2e3d8cdafbTill Mossakowski<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
4d7d53fec6b551333c79da6ae3b8ca2af0a741abChristian Maeder SetEnvIfNoCase Host Apache\.Org site=apache
d9a45a35cd696085be1a038b2cc67bee6819c574cmaeder <p>This will cause the <code>site</code> environment variable
f5e43c6208179131e179f075248880a8cae1e111cmaeder to be set to "<code>apache</code>" if the HTTP request header
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder field <code>Host:</code> was included and contained
c8117ae0b6088d835211e494aef229558c814bd3cmaeder <code>Apache.Org</code>, <code>apache.org</code>, or any other
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder combination.</p>
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder<hr/><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img alt="Index" src="/images/index.gif"/></a><a href="../"><img alt="Home" src="/images/home.gif"/></a></blockquote></body></html>