mod_rewrite.xml revision 3bd4f2a469a28a479ba4336e0494802697e67e6a
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick<!-- $LastChangedRevision$ -->
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick Licensed to the Apache Software Foundation (ASF) under one or more
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick contributor license agreements. See the NOTICE file distributed with
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick this work for additional information regarding copyright ownership.
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick The ASF licenses this file to You under the Apache License, Version 2.0
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick (the "License"); you may not use this file except in compliance with
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick the License. You may obtain a copy of the License at
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick Unless required by applicable law or agreed to in writing, software
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick distributed under the License is distributed on an "AS IS" BASIS,
fb18194cd0e59b737cc179eb2354a2dcd16087d4trawick WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick See the License for the specific language governing permissions and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick limitations under the License.
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick<description>Provides a rule-based rewriting engine to rewrite requested
f6ba728fd666800e11b36452f7ad76ec5fcff653trawickURLs on the fly</description>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <p>The <module>mod_rewrite</module> module uses a rule-based rewriting
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick engine, based on a regular-expression parser, to rewrite requested URLs on
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick the fly. By default, <module>mod_rewrite</module> maps a URL to a filesystem
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick path. However, it can also be used to redirect one URL to another URL, or
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick to invoke an internal proxy fetch.</p>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <p><module>mod_rewrite</module> provides a flexible and powerful way to
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick manipulate URLs using an unlimited number of rules. Each rule can have an
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick unlimited number of attached rule conditions, to allow you to rewrite URL
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick based on server variables, environment variables, HTTP headers, or time
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick stamps.</p>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <p><module>mod_rewrite</module> operates on the full URL path, including the
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick path-info section. A rewrite rule can be invoked in
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <code>httpd.conf</code> or in <code>.htaccess</code>. The path generated
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick by a rewrite rule can include a query string, or can lead to internal
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick sub-processing, external request redirection, or internal proxy
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick throughput.</p>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <p>Further details, discussion, and examples, are provided in the
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <a href="/rewrite/">detailed mod_rewrite documentation</a>.</p>
798cfee8074b529042079c77eee6962a723350detrawick <p><module>mod_rewrite</module> offers detailed logging of its actions
798cfee8074b529042079c77eee6962a723350detrawick at the <code>trace1</code> to <code>trace8</code> log levels. The
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick log level can be set specifically for <module>mod_rewrite</module>
798cfee8074b529042079c77eee6962a723350detrawick using the <directive module="core">LogLevel</directive> directive: Up to
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick level <code>debug</code>, no actions are logged, while <code>trace8</code>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick means that practically all actions are logged.</p>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick Using a high trace log level for <module>mod_rewrite</module>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick will slow down your Apache HTTP Server dramatically! Use a log
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick level higher than <code>trace2</code> only for debugging!
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick LogLevel alert rewrite:trace3
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>Those familiar with earlier versions of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <module>mod_rewrite</module> will no doubt be looking for the
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <code>RewriteLog</code> and <code>RewriteLogLevel</code>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick directives. This functionality has been completely replaced by the
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick new per-module logging configuration mentioned above.
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <p>To get just the <module>mod_rewrite</module>-specific log
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick messages, pipe the log file through grep:</p>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick tail -f error_log|fgrep '[rewrite:'
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<description>Enables or disables runtime rewriting engine</description>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<contextlist><context>server config</context><context>virtual host</context>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<context>directory</context><context>.htaccess</context></contextlist>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <p>The <directive>RewriteEngine</directive> directive enables or
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick disables the runtime rewriting engine. If it is set to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>off</code> this module does no runtime processing at
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick all. It does not even update the <code>SCRIPT_URx</code>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick environment variables.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>Use this directive to disable the module instead of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick commenting out all the <directive
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick module="mod_rewrite">RewriteRule</directive> directives!</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>Note that rewrite configurations are not
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick inherited by virtual hosts. This means that you need to have a
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <code>RewriteEngine on</code> directive for each virtual host
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick in which you wish to use rewrite rules.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p><directive>RewriteMap</directive> directives of the type <code>prg</code>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick are not started during server initialization if they're defined in a
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick context that does not have <directive>RewriteEngine</directive> set to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick</directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<description>Sets some special options for the rewrite engine</description>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<contextlist><context>server config</context><context>virtual host</context>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<context>directory</context><context>.htaccess</context></contextlist>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<compatibility><code>MaxRedirects</code> is no longer available in version 2.1 and
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawicklater</compatibility>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The <directive>RewriteOptions</directive> directive sets some
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick special options for the current per-server or per-directory
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick configuration. The <em>Option</em> string can currently
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick only be one of the following:</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>This forces the current configuration to inherit the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick configuration of the parent. In per-virtual-server context,
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick this means that the maps, conditions and rules of the main
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick server are inherited. In per-directory context this means
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick that conditions and rules of the parent directory's
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <directive type="section" module="core">Directory</directive>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick sections are inherited. The inherited rules are virtually copied
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick to the section where this directive is being used. If used in
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick combination with local rules, the inherited rules are copied behind
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the local rules. The position of this directive - below or above
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick of local rules - has no influence on this behavior. If local
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick rules forced the rewriting to stop, the inherited rules won't
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick be processed.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Rules inherited from the parent scope are applied
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <strong>after</strong> rules specified in the child scope.
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <p> Like <code>Inherit</code> above, but the rules from the parent scope
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick are applied <strong>before</strong> rules specified in the child scope.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Available in Apache HTTP Server 2.3.10 and later.</p>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick</directivesynopsis>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<description>Defines a mapping function for key-lookup</description>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<syntax>RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick<contextlist><context>server config</context><context>virtual host</context>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick</contextlist>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<compatibility>The choice of different dbm types is available in
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawickApache HTTP Server 2.0.41 and later</compatibility>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The <directive>RewriteMap</directive> directive defines a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <em>Rewriting Map</em> which can be used inside rule
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick substitution strings by the mapping-functions to
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick insert/substitute fields through a key lookup. The source of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick this lookup can be of various types.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The <a id="mapfunc" name="mapfunc"><em>MapName</em></a> is
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the name of the map and will be used to specify a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick mapping-function for the substitution strings of a rewriting
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick rule via one of the following constructs:</p>
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick <strong><code>${</code> <em>MapName</em> <code>:</code>
cf30286e95bd9b293bb4e3d5e4b89ed9d51d7a3ftrawick <em>LookupKey</em> <code>|</code> <em>DefaultValue</em>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>When such a construct occurs, the map <em>MapName</em> is
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick consulted and the key <em>LookupKey</em> is looked-up. If the
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick key is found, the map-function construct is substituted by
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick <em>SubstValue</em>. If the key is not found then it is
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick substituted by <em>DefaultValue</em> or by the empty string
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick if no <em>DefaultValue</em> was specified. Empty values
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick behave as if the key was absent, therefore it is not possible
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick to distinguish between empty-valued keys and absent keys.</p>
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick <p>For example, you might define a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>You would then be able to use this map in a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick RewriteRule ^/ex/(.*) ${examplemap:$1}
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The following combinations for <em>MapType</em> and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>A plain text file containing space-separated key-value
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick pairs, one per line. (<a href="/rewrite/rewritemap.html#txt">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>Randomly selects an entry from a plain text file (<a href="/rewrite/rewritemap.html#rnd">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>Looks up an entry in a dbm file containing name, value
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick pairs. Hash is constructed from a plain text file format using
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick the <code><a href="/programs/httxt2dbm.html">httxt2dbm</a></code>
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick utility. (<a href="/rewrite/rewritemap.html#dbm">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>One of the four available internal functions provided by
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>RewriteMap</code>: toupper, tolower, escape or
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick unescape. (<a href="/rewrite/rewritemap.html#int">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>Calls an external program or script to process the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick rewriting. (<a href="/rewrite/rewritemap.html#prg">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>A SQL SELECT statement to be performed to look up the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick rewrite target. (<a href="/rewrite/rewritemap.html#dbd">Details ...</a>)</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>Further details, and numerous examples, may be found in the <a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick href="/rewrite/rewritemap.html">RewriteMap HowTo</a></p>
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick</directivesynopsis>
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick<directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<description>Sets the base URL for per-directory rewrites</description>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<contextlist><context>directory</context><context>.htaccess</context>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick</contextlist>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The <directive>RewriteBase</directive> directive explicitly
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick sets the base URL-path (not filesystem directory path!) for per-directory rewrites
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick that result in the substitution of a relative path.
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick When you use a <directive module="mod_rewrite">RewriteRule</directive>
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick in a <code>.htaccess</code> file, <module>mod_rewrite</module> strips off
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick the local directory prefix before processing, then rewrites the rest of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the URL. When the rewrite is completed, <module>mod_rewrite</module>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick automatically adds the local directory prefix (or the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <directive>RewriteBase</directive> when set) back on to the substitution
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick before handing it back to the core of the server as if it were the original
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>This directive is <em>required</em> for per-directory rewrites whose context
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick is a directory made available via the <directive module="mod_alias">Alias</directive>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick directive, when the substitution uses a relative path.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>If your URL path does not exist verbatim on the filesystem,
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick or isn't directly under your <directive module="core">DocumentRoot</directive>,
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick you must use <directive>RewriteBase</directive> in every
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick <code>.htaccess</code> file where you want to use <directive
182d9b96e04124d14c9f539109fb4e8cbd360d36trawick module="mod_rewrite">RewriteRule</directive> directives.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>The example below demonstrates how to map
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick /home/www/example/newsite.html, in a <code>.htaccess</code> file. This
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick assumes that the content available at
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick http://example.com/ is on disk at /home/www/example/</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawickRewriteEngine On
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick# The URL-path used to get to this context, not the filesystem path
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawickRewriteBase /myapp/
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawickRewriteRule ^index\.html$ newsite.html
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick</directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<directivesynopsis>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<description>Defines a condition under which rewriting will take place
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick</description>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<syntax> RewriteCond
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick<contextlist><context>server config</context><context>virtual host</context>
e6114dbc138189372015ea6ed63bc757645922a7trawick<context>directory</context><context>.htaccess</context></contextlist>
e6114dbc138189372015ea6ed63bc757645922a7trawick <p>The <directive>RewriteCond</directive> directive defines a
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick rule condition. One or more <directive>RewriteCond</directive>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick can precede a <directive module="mod_rewrite">RewriteRule</directive>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick directive. The following rule is then only used if both
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the current state of the URI matches its pattern, <strong
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p><em>TestString</em> is a string which can contain the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick following expanded constructs in addition to plain text:</p>
798cfee8074b529042079c77eee6962a723350detrawick <strong>RewriteRule backreferences</strong>: These are
798cfee8074b529042079c77eee6962a723350detrawick backreferences of the form <strong><code>$N</code></strong>
798cfee8074b529042079c77eee6962a723350detrawick (0 <= N <= 9). $1 to $9 provide access to the grouped
798cfee8074b529042079c77eee6962a723350detrawick parts (in parentheses) of the pattern, from the
798cfee8074b529042079c77eee6962a723350detrawick <code>RewriteRule</code> which is subject to the current
798cfee8074b529042079c77eee6962a723350detrawick set of <code>RewriteCond</code> conditions. $0 provides
798cfee8074b529042079c77eee6962a723350detrawick access to the whole string matched by that pattern.
798cfee8074b529042079c77eee6962a723350detrawick <strong>RewriteCond backreferences</strong>: These are
798cfee8074b529042079c77eee6962a723350detrawick backreferences of the form <strong><code>%N</code></strong>
798cfee8074b529042079c77eee6962a723350detrawick (0 <= N <= 9). %1 to %9 provide access to the grouped
798cfee8074b529042079c77eee6962a723350detrawick parts (again, in parentheses) of the pattern, from the last matched
798cfee8074b529042079c77eee6962a723350detrawick of conditions. %0 provides access to the whole string matched by
798cfee8074b529042079c77eee6962a723350detrawick that pattern.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick RewriteMap</a> for more details.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <strong>Server-Variables</strong>: These are variables of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick where <em>NAME_OF_VARIABLE</em> can be a string taken
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick from the following list:
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <columnspec><column width=".3"/><column width=".3"/>
798cfee8074b529042079c77eee6962a723350detrawick <th>HTTP headers:</th> <th>connection & request:</th> <th></th>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_USER_AGENT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_REFERER<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_COOKIE<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_FORWARDED<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_HOST<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_PROXY_CONNECTION<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick HTTP_ACCEPT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REMOTE_ADDR<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REMOTE_HOST<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REMOTE_PORT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REMOTE_USER<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REMOTE_IDENT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_METHOD<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SCRIPT_FILENAME<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick PATH_INFO<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick QUERY_STRING<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick AUTH_TYPE<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <th>server internals:</th> <th>date and time:</th> <th>specials:</th>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick DOCUMENT_ROOT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_ADMIN<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_NAME<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_ADDR<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_PORT<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_PROTOCOL<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick SERVER_SOFTWARE<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick TIME_YEAR<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick TIME_MON<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick TIME_DAY<br />
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick TIME_HOUR<br />
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick TIME_MIN<br />
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick TIME_SEC<br />
f6ba728fd666800e11b36452f7ad76ec5fcff653trawick TIME_WDAY<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick API_VERSION<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick THE_REQUEST<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_URI<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_FILENAME<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick IS_SUBREQ<br />
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick HTTPS<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_SCHEME<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>These variables all
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick correspond to the similarly named HTTP
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick MIME-headers, C variables of the Apache HTTP Server or
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Most are documented elsewhere in the Manual or in
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the CGI specification.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>SERVER_NAME and SERVER_PORT depend on the values of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <directive module="core">UseCanonicalName</directive> and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <directive module="core">UseCanonicalPhysicalPort</directive>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick respectively.</p>
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick <p>Those that are special to mod_rewrite include those below.</p>
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick <dd>Will contain the text "true" if the request
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick currently being processed is a sub-request,
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick "false" otherwise. Sub-requests may be generated
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick by modules that need to resolve additional files
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick or URIs in order to complete their tasks.</dd>
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick <dd>This is the version of the Apache httpd module API
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick (the internal interface between server and
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick module) in the current httpd build, as defined in
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick corresponds to the version of Apache httpd in use (in
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick the release version of Apache httpd 1.3.14, for
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick instance, it is 19990320:10), but is mainly of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick interest to module authors.</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>The full HTTP request line sent by the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick include any additional headers sent by the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick browser. This value has not been unescaped
e6114dbc138189372015ea6ed63bc757645922a7trawick (decoded), unlike most other variables below.</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>The path component of the requested URI,
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick such as "/index.html". This notably excludes the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick query string which is available as as its own variable
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <dd>The full local filesystem path to the file or
e6114dbc138189372015ea6ed63bc757645922a7trawick script matching the request, if this has already
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick been determined by the server at the time
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>REQUEST_FILENAME</code> is referenced. Otherwise,
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick such as when used in virtual host context, the same
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick <dd>Will contain the text "on" if the connection is
1f5a6b18eb1d06210b03a7c8ea7a07506f5949ddtrawick can be safely used regardless of whether or not
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick <dd>Will contain the scheme of the request (ususally
1f5a6b18eb1d06210b03a7c8ea7a07506f5949ddtrawick "http" or "https"). This value can be influenced with
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick <directive module="core">ServerName</directive>.</dd>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>If the <em>TestString</em> has the special value <code>expr</code>, the
88c0d6d1cfdecfa8c2b6d7ae2482f06755cd7887trawick <p>The variables SCRIPT_FILENAME and REQUEST_FILENAME
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick contain the same value - the value of the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>request_rec</code> structure of the Apache HTTP Server.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick The first name is the commonly known CGI variable name
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick while the second is the appropriate counterpart of
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_URI (which contains the value of the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>uri</code> field of <code>request_rec</code>).</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>If a substitution occurred and the rewriting continues,
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the value of both variables will be updated accordingly.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>If used in per-server context (<em>i.e.</em>, before the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick request is mapped to the filesystem) SCRIPT_FILENAME and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick REQUEST_FILENAME cannot contain the full local filesystem
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick path since the path is unknown at this stage of processing.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Both variables will initially contain the value of REQUEST_URI
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick in that case. In order to obtain the full local filesystem
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick path of the request in per-server context, use an URL-based
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick look-ahead <code>%{LA-U:REQUEST_FILENAME}</code> to determine
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{ENV:variable}</code>, where <em>variable</em> can be
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick any environment variable, is also available.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick This is looked-up via internal
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Apache httpd structures and (if not found there) via
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>getenv()</code> from the Apache httpd server process.</li>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{SSL:variable}</code>, where <em>variable</em> is the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick name of an <a href="mod_ssl.html#envvars">SSL environment
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick variable</a>, can be used whether or not
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <module>mod_ssl</module> is loaded, but will always expand to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the empty string if it is not. Example:
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{SSL:SSL_CIPHER_USEKEYSIZE}</code> may expand to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{HTTP:header}</code>, where <em>header</em> can be
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick any HTTP MIME-header name, can always be used to obtain the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick value of a header sent in the HTTP request.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the value of the HTTP header
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>If a HTTP header is used in a condition this header is added to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the Vary header of the response in case the condition evaluates to
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick to true for the request. It is <strong>not</strong> added if the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick condition evaluates to false for the request. Adding the HTTP header
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick to the Vary header of the response is needed for proper caching.</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>It has to be kept in mind that conditions follow a short circuit
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick logic in the case of the '<strong><code>ornext|OR</code></strong>' flag
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick so that certain conditions might not be evaluated at all.</p></li>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{LA-U:variable}</code> can be used for look-aheads which perform
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick an internal (URL-based) sub-request to determine the final
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick value of <em>variable</em>. This can be used to access
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick variable for rewriting which is not available at the current
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick stage, but will be set in a later phase.
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>For instance, to rewrite according to the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick per-server context (<code>httpd.conf</code> file) you must
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick variable is set by the authorization phases, which come
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <em>after</em> the URL translation phase (during which mod_rewrite
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick operates).</p>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <p>On the other hand, because mod_rewrite implements
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick its per-directory context (<code>.htaccess</code> file) via
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick the Fixup phase of the API and because the authorization
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick phases come <em>before</em> this phase, you just can use
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{REMOTE_USER}</code> in that context.</p></li>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <code>%{LA-F:variable}</code> can be used to perform an internal
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick (filename-based) sub-request, to determine the final value
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick of <em>variable</em>. Most of the time, this is the same as
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick LA-U above.</li>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick a regular expression which is applied to the
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <em>TestString</em> is first evaluated, before being matched against
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick <em>perl compatible regular expression</em>, but there is
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick additional syntax available to perform other useful tests against
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick <li>You can prefix the pattern string with a
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick '<code>!</code>' character (exclamation mark) to specify a
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick You can perform lexicographical string comparisons:
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick <li>'<strong><CondPattern</strong>' (lexicographically
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick precedes)<br />
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick Treats the <em>CondPattern</em> as a plain string and
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick compares it lexicographically to <em>TestString</em>. True if
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick <li>'<strong>>CondPattern</strong>' (lexicographically
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick follows)<br />
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick Treats the <em>CondPattern</em> as a plain string and
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick compares it lexicographically to <em>TestString</em>. True if
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <li>'<strong>=CondPattern</strong>' (lexicographically
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick equal)<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Treats the <em>CondPattern</em> as a plain string and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick compares it lexicographically to <em>TestString</em>. True if
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick equal, character for character). If <em>CondPattern</em>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick compares <em>TestString</em> to the empty string.</li>
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick <li>'<strong><=CondPattern</strong>' (lexicographically
6500ceb45a2075fad36a0dc5c86a23858bf9c84etrawick less than or equal to)<br />
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick Treats the <em>CondPattern</em> as a plain string and
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick compares it lexicographically to <em>TestString</em>. True
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick <em>CondPattern</em>, or is equal to <em>CondPattern</em>
fcd5c4e9e126e867eb270ed2d4138348cb1e46e5trawick (the two strings are equal, character for character).</li>
a8002cb6eb5309086e06721eb2cdc20b891840fftrawick <li>'<strong>>=CondPattern</strong>' (lexicographically
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick greater than or equal to)<br />
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick Treats the <em>CondPattern</em> as a plain string and
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick compares it lexicographically to <em>TestString</em>. True
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick <em>CondPattern</em>, or is equal to <em>CondPattern</em>
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick (the two strings are equal, character for character).</li>
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick You can perform integer comparisons:
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick The <em>TestString</em> is treated as an integer, and is
a63c98c28033ca762ca4dcbed6b3adef63580e7ctrawick numerically compared to the <em>CondPattern</em>. True if
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick the two are numerically equal.</li>
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <strong>g</strong>reater than or <strong>e</strong>qual to)<br />
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick The <em>TestString</em> is treated as an integer, and is
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick numerically compared to the <em>CondPattern</em>. True if
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick the <em>TestString</em> is numerically greater than or equal
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick <strong>g</strong>reater <strong>t</strong>han)<br />
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick The <em>TestString</em> is treated as an integer, and is
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick numerically compared to the <em>CondPattern</em>. True if
e6114dbc138189372015ea6ed63bc757645922a7trawick <strong>l</strong>ess than or <strong>e</strong>qual to)<br />
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick The <em>TestString</em> is treated as an integer, and is
e6114dbc138189372015ea6ed63bc757645922a7trawick numerically compared to the <em>CondPattern</em>. True if
e6114dbc138189372015ea6ed63bc757645922a7trawick the <em>TestString</em> is numerically less than or equal
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick to the <em>CondPattern</em>. Avoid confusion with the
e6114dbc138189372015ea6ed63bc757645922a7trawick <strong>-l</strong> by using the <strong>-L</strong> or
e6114dbc138189372015ea6ed63bc757645922a7trawick The <em>TestString</em> is treated as an integer, and is
4e2fbd7af73349caa41681acc2ec43d6d7011beatrawick numerically compared to the <em>CondPattern</em>. True if
RewriteRule ...some special stuff for any of these hosts...
RewriteRule ^/$ /homepage.max.html [L]
RewriteRule ^/$ /homepage.min.html [L]
RewriteRule ^/$ /homepage.std.html [L]
CO=<em>NAME</em>:<em>VAL</em>:<em>domain</em>[:<em>lifetime</em>[:<em>path</em>[:<em>secure</em>[:<em>httponly</em>]]]] <em><a href="/rewrite/flags.html#flag_co">details ...</a></em>