]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/mod_rewrite.html.en
rebuild
[apache] / docs / manual / mod / mod_rewrite.html.en
index b8711afe1ea7d6957e3804b8bfff5c89a6e5f0e3..e310b299f886c0ed93d159f2298675fadf3039bb 100644 (file)
@@ -5,11 +5,11 @@
               This file is generated from xml source: DO NOT EDIT
         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
       -->
-<title>mod_rewrite - Apache HTTP Server</title>
+<title>mod_rewrite - Apache HTTP Server Version 2.5</title>
 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
-<script src="../style/scripts/prettify.js" type="text/javascript">
+<script src="../style/scripts/prettify.min.js" type="text/javascript">
 </script>
 
 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
@@ -84,9 +84,7 @@ URLs on the fly</td></tr>
       level higher than <code>trace2</code> only for debugging!
     </div>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-      LogLevel alert rewrite:trace3
-      </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">LogLevel alert rewrite:trace3</pre>
 </div>
 
     <div class="note"><h3>RewriteLog</h3>
@@ -139,15 +137,13 @@ URLs on the fly</td></tr>
     since the resource was not relative to the document root.  This 
     misconfiguration would normally cause the server to look for an "opt"
     directory under the document root.</p>
-<pre class="prettyprint lang-config">
-DocumentRoot /var/www/example.com
+<pre class="prettyprint lang-config">DocumentRoot /var/www/example.com
 Alias /myapp /opt/myapp-1.2.3
 &lt;Directory /opt/myapp-1.2.3&gt;
     RewriteEngine On
     RewriteBase /myapp/
     RewriteRule ^index\.html$  welcome.html 
-&lt;/Directory&gt;
-</pre>
+&lt;/Directory&gt;</pre>
 
 
 </div>
@@ -213,26 +209,30 @@ Alias /myapp /opt/myapp-1.2.3
 
             <tr>
               <td>
-                 HTTP_USER_AGENT<br />
-                 HTTP_REFERER<br />
+                 HTTP_ACCEPT<br />
                  HTTP_COOKIE<br />
                  HTTP_FORWARDED<br />
                  HTTP_HOST<br />
                  HTTP_PROXY_CONNECTION<br />
-                 HTTP_ACCEPT<br />
+                 HTTP_REFERER<br />
+                 HTTP_USER_AGENT<br />
               </td>
 
               <td>
+                 AUTH_TYPE<br />
+                 CONN_REMOTE_ADDR<br />
+                 CONTEXT_PREFIX<br />
+                 CONTEXT_DOCUMENT_ROOT<br />
+                 IPV6<br />
+                 PATH_INFO<br />
+                 QUERY_STRING<br />
                  REMOTE_ADDR<br />
                  REMOTE_HOST<br />
+                 REMOTE_IDENT<br />
                  REMOTE_PORT<br />
                  REMOTE_USER<br />
-                 REMOTE_IDENT<br />
                  REQUEST_METHOD<br />
                  SCRIPT_FILENAME<br />
-                 PATH_INFO<br />
-                 QUERY_STRING<br />
-                 AUTH_TYPE<br />
               </td>
 
               <td />
@@ -245,9 +245,11 @@ Alias /myapp /opt/myapp-1.2.3
             <tr>
               <td>
                  DOCUMENT_ROOT<br />
+                 SCRIPT_GROUP<br />
+                 SCRIPT_USER<br />
+                 SERVER_ADDR<br />
                  SERVER_ADMIN<br />
                  SERVER_NAME<br />
-                 SERVER_ADDR<br />
                  SERVER_PORT<br />
                  SERVER_PROTOCOL<br />
                  SERVER_SOFTWARE<br />
@@ -266,12 +268,14 @@ Alias /myapp /opt/myapp-1.2.3
 
               <td>
                  API_VERSION<br />
-                 THE_REQUEST<br />
-                 REQUEST_URI<br />
-                 REQUEST_FILENAME<br />
-                 IS_SUBREQ<br />
+                 CONN_REMOTE_ADDR<br />
                  HTTPS<br />
+                 IS_SUBREQ<br />
+                 REMOTE_ADDR<br />
+                 REQUEST_FILENAME<br />
                  REQUEST_SCHEME<br />
+                 REQUEST_URI<br />
+                 THE_REQUEST<br />
               </td>
             </tr>
           </table>
@@ -280,8 +284,8 @@ Alias /myapp /opt/myapp-1.2.3
                 correspond to the similarly named HTTP
                 MIME-headers, C variables of the Apache HTTP Server or
                 <code>struct tm</code> fields of the Unix system.
-                Most are documented elsewhere in the Manual or in
-                the CGI specification.</p>
+                Most are documented <a href="../expr.html#vars">here</a>
+                or elsewhere in the Manual or in the CGI specification.</p>
 
                 <p>SERVER_NAME and SERVER_PORT depend on the values of
                 <code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code> and
@@ -291,14 +295,6 @@ Alias /myapp /opt/myapp-1.2.3
                 <p>Those that are special to mod_rewrite include those below.</p>
         <div class="note">
                 <dl>
-                  <dt><code>IS_SUBREQ</code></dt>
-
-                  <dd>Will contain the text "true" if the request
-                  currently being processed is a sub-request,
-                  "false" otherwise. Sub-requests may be generated
-                  by modules that need to resolve additional files
-                  or URIs in order to complete their tasks.</dd>
-
                   <dt><code>API_VERSION</code></dt>
 
                   <dd>This is the version of the Apache httpd module API
@@ -310,21 +306,30 @@ Alias /myapp /opt/myapp-1.2.3
                   instance, it is 19990320:10), but is mainly of
                   interest to module authors.</dd>
 
-                  <dt><code>THE_REQUEST</code></dt>
+                  <dt><code>CONN_REMOTE_ADDR</code></dt>
 
-                  <dd>The full HTTP request line sent by the
-                  browser to the server (e.g., "<code>GET
-                  /index.html HTTP/1.1</code>"). This does not
-                  include any additional headers sent by the
-                  browser.  This value has not been unescaped
-                  (decoded), unlike most other variables below.</dd>
+                  <dd>Since 2.4.8: The peer IP address of the connection (see the
+                  <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> module).</dd>
 
-                  <dt><code>REQUEST_URI</code></dt>
+                  <dt><code>HTTPS</code></dt>
 
-                  <dd>The path component of the requested URI,
-                  such as "/index.html".  This notably excludes the
-                  query string which is available as as its own variable
-                  named <code>QUERY_STRING</code>.</dd>
+                  <dd>Will contain the text "on" if the connection is
+                  using SSL/TLS, or "off" otherwise.  (This variable
+                  can be safely used regardless of whether or not
+                  <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is loaded).</dd>
+
+                  <dt><code>IS_SUBREQ</code></dt>
+
+                  <dd>Will contain the text "true" if the request
+                  currently being processed is a sub-request,
+                  "false" otherwise. Sub-requests may be generated
+                  by modules that need to resolve additional files
+                  or URIs in order to complete their tasks.</dd>
+
+                  <dt><code>REMOTE_ADDR</code></dt>
+
+                  <dd>The IP address of the remote host (see the
+                  <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> module).</dd>
 
                   <dt><code>REQUEST_FILENAME</code></dt>
 
@@ -339,19 +344,28 @@ Alias /myapp /opt/myapp-1.2.3
                   <code>REQUEST_URI</code> to map the request to a file.
                   </dd>
 
-                  <dt><code>HTTPS</code></dt>
-
-                  <dd>Will contain the text "on" if the connection is
-                  using SSL/TLS, or "off" otherwise.  (This variable
-                  can be safely used regardless of whether or not
-                  <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is loaded).</dd>
-
                   <dt><code>REQUEST_SCHEME</code></dt>
 
                   <dd>Will contain the scheme of the request (usually
                   "http" or "https"). This value can be influenced with
                   <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>.</dd>
 
+                  <dt><code>REQUEST_URI</code></dt>
+
+                  <dd>The path component of the requested URI,
+                  such as "/index.html".  This notably excludes the
+                  query string which is available as as its own variable
+                  named <code>QUERY_STRING</code>.</dd>
+
+                  <dt><code>THE_REQUEST</code></dt>
+
+                  <dd>The full HTTP request line sent by the
+                  browser to the server (e.g., "<code>GET
+                  /index.html HTTP/1.1</code>"). This does not
+                  include any additional headers sent by the
+                  browser.  This value has not been unescaped
+                  (decoded), unlike most other variables below.</dd>
+
                 </dl>
 </div>
         </li>
@@ -411,7 +425,7 @@ Alias /myapp /opt/myapp-1.2.3
         the value of the HTTP header
         ``<code>Proxy-Connection:</code>''.
         <p>If a HTTP header is used in a condition this header is added to
-        the Vary header of the response in case the condition evaluates to
+        the Vary header of the response in case the condition evaluates
         to true for the request. It is <strong>not</strong> added if the
         condition evaluates to false for the request. Adding the HTTP header
         to the Vary header of the response is needed for proper caching.</p>
@@ -593,13 +607,18 @@ Alias /myapp /opt/myapp-1.2.3
             whether or not it exists, and is a regular file with size greater
             than zero.</li>
 
-            <li>'<strong>-U</strong>' (is existing URL, via
+            <li><p>'<strong>-U</strong>' (is existing URL, via
             subrequest)<br />
             Checks whether or not <em>TestString</em> is a valid URL,
             accessible via all the server's currently-configured
             access controls for that path. This uses an internal
             subrequest to do the check, so use it with care -
-            it can impact your server's performance!</li>
+            it can impact your server's performance!</p>
+            <p> This flag <em>only</em> returns information about things
+            like access control, authentication, and authorization.  This flag
+            <em>does not</em> return information about the status code the 
+            configured handler (static file, CGI, proxy, etc.) would have 
+            returned.</p> </li>
 
             <li>'<strong>-x</strong>' (has e<strong>x</strong>ecutable
             permissions)<br />
@@ -628,10 +647,8 @@ Alias /myapp /opt/myapp-1.2.3
             to block unwanted hotlinking.
            </p>
 
-           <pre class="prettyprint lang-config">
-           RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"<br />
-           RewriteRule ^/images - [F]
-           </pre>
+           <pre class="prettyprint lang-config">           RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"<br />
+           RewriteRule ^/images - [F]</pre>
 
         </li>
 
@@ -658,12 +675,10 @@ Alias /myapp /opt/myapp-1.2.3
           Use this to combine rule conditions with a local OR
           instead of the implicit AND. Typical example:
 
-<pre class="prettyprint lang-config">
-RewriteCond %{REMOTE_HOST}  ^host1  [OR]
+<pre class="prettyprint lang-config">RewriteCond %{REMOTE_HOST}  ^host1  [OR]
 RewriteCond %{REMOTE_HOST}  ^host2  [OR]
 RewriteCond %{REMOTE_HOST}  ^host3
-RewriteRule ...some special stuff for any of these hosts...
-</pre>
+RewriteRule ...some special stuff for any of these hosts...</pre>
 
 
           Without this flag you would have to write the condition/rule
@@ -689,12 +704,10 @@ RewriteRule ...some special stuff for any of these hosts...
         ``<code>User-Agent:</code>'' header of the request, you can
         use the following: </p>
 
-<pre class="prettyprint lang-config">
-RewriteCond  %{HTTP_USER_AGENT}  (iPhone|Blackberry|Android)
+<pre class="prettyprint lang-config">RewriteCond  %{HTTP_USER_AGENT}  (iPhone|Blackberry|Android)
 RewriteRule  ^/$                 /homepage.mobile.html  [L]
 
-RewriteRule  ^/$                 /homepage.std.html  [L]
-</pre>
+RewriteRule  ^/$                 /homepage.std.html  [L]</pre>
 
 
         <p>Explanation: If you use a browser which identifies itself
@@ -723,7 +736,7 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       all. It does not even update the <code>SCRIPT_URx</code>
       environment variables.</p>
 
-      <p>Use this directive to disable rules in a particular contact,
+      <p>Use this directive to disable rules in a particular context,
       rather than commenting out all the <code class="directive"><a href="#rewriterule">RewriteRule</a></code> directives.</p>
 
       <p>Note that rewrite configurations are not
@@ -778,17 +791,13 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <p>For example, you might define a
       <code class="directive">RewriteMap</code> as:</p>
 
-      <pre class="prettyprint lang-config">
-      RewriteMap examplemap txt:/path/to/file/map.txt
-      </pre>
+      <pre class="prettyprint lang-config">RewriteMap examplemap txt:/path/to/file/map.txt</pre>
 
 
       <p>You would then be able to use this map in a
       <code class="directive">RewriteRule</code> as follows:</p>
 
-      <pre class="prettyprint lang-config">
-      RewriteRule ^/ex/(.*) ${examplemap:$1}
-      </pre>
+      <pre class="prettyprint lang-config">RewriteRule ^/ex/(.*) ${examplemap:$1}</pre>
 
 
       <p>The following combinations for <em>MapType</em> and
@@ -871,10 +880,39 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <dt><code>InheritBefore</code></dt>
       <dd>
       <p> Like <code>Inherit</code> above, but the rules from the parent scope
-      are applied <strong>before</strong> rules specified in the child scope.
+      are applied <strong>before</strong> rules specified in the child scope.<br />
       Available in Apache HTTP Server 2.3.10 and later.</p>
       </dd>
 
+      <dt><code>InheritDown</code></dt>
+      <dd>
+
+      <p>If this option is enabled, all child configurations will inherit
+      the configuration of the current configuration. It is equivalent to
+      specifying <code>RewriteOptions Inherit</code> in all child
+      configurations. See the <code>Inherit</code> option for more details
+      on how the parent-child relationships are handled.<br />
+      Available in Apache HTTP Server 2.4.8 and later.</p>
+      </dd>
+
+      <dt><code>InheritDownBefore</code></dt>
+      <dd>
+
+      <p>Like <code>InheritDown</code> above, but the rules from the current
+      scope are applied <strong>before</strong> rules specified in any child's
+      scope.<br />
+      Available in Apache HTTP Server 2.4.8 and later.</p>
+      </dd>
+
+      <dt><code>IgnoreInherit</code></dt>
+      <dd>
+
+      <p>This option forces the current and child configurations to ignore
+      all rules that would be inherited from a parent specifying
+      <code>InheritDown</code> or <code>InheritDownBefore</code>.<br />
+      Available in Apache HTTP Server 2.4.8 and later.</p>
+      </dd>
+
       <dt><code>AllowNoSlash</code></dt>
       <dd>
       <p>By default, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> will ignore URLs that map to a
@@ -886,8 +924,8 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       is set to off, the <code>AllowNoSlash</code> option can be enabled to ensure
       that rewrite rules are no longer ignored. This option makes it possible to
       apply rewrite rules within .htaccess files that match the directory without
-      a trailing slash, if so desired. Available in Apache HTTP Server 2.4.0 and
-      later.</p>
+      a trailing slash, if so desired.<br />
+      Available in Apache HTTP Server 2.4.0 and later.</p>
       </dd>
 
       <dt><code>AllowAnyURI</code></dt>
@@ -896,7 +934,7 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <p>When <code class="directive"><a href="#rewriterule">RewriteRule</a></code>
       is used in <code>VirtualHost</code> or server context with
       version 2.2.22 or later of httpd, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
-      will only process the rewrite rules if the request URI is a <a href="./directive-dict.html#Syntax">URL-path</a>.  This avoids
+      will only process the rewrite rules if the request URI is a <a href="directive-dict.html#Syntax">URL-path</a>.  This avoids
       some security issues where particular rules could allow
       "surprising" pattern expansions (see <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3368">CVE-2011-3368</a>
       and <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4317">CVE-2011-4317</a>).
@@ -904,7 +942,8 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <code>AllowAnyURI</code> option can be enabled, and
       <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> will apply the rule set to any
       request URI string, regardless of whether that string matches
-      the URL-path grammar required by the HTTP specification.</p>
+      the URL-path grammar required by the HTTP specification.<br />
+      Available in Apache HTTP Server 2.4.3 and later.</p>
 
       <div class="warning">
       <h3>Security Warning</h3> 
@@ -924,8 +963,9 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
 
       <p>With this option, the value of <code class="directive"><a href="#rewritebase">RewriteBase</a></code> is copied from where it's explicitly defined
       into any sub-directory or sub-location that doesn't define its own
-      <code class="directive"><a href="#rewritebase">RewriteBase</a></code>. Available in 
-      Apache HTTP Server 2.5 and later only.</p>
+      <code class="directive"><a href="#rewritebase">RewriteBase</a></code>. This was the
+      default behavior in 2.4.0 through 2.4.3, and the flag to restore it is
+      available Apache HTTP Server 2.4.4 and later.</p>
       </dd>
       </dl>
 
@@ -951,8 +991,8 @@ RewriteRule  ^/$                 /homepage.std.html  [L]
       <p><a id="patterns" name="patterns"><em>Pattern</em></a> is
       a perl compatible <a id="regexp" name="regexp">regular
       expression</a>. On the first RewriteRule, it is matched against
-      the (%-decoded) <a href="./directive-dict.html#Syntax">URL-path</a> (or 
-      <a href="./directive-dict.html#Syntax">file-path</a>, depending 
+      the (%-decoded) <a href="directive-dict.html#Syntax">URL-path</a> (or 
+      <a href="directive-dict.html#Syntax">file-path</a>, depending 
       on the context) of the request. Subsequent patterns are matched against the 
       output of the last matching RewriteRule.</p>
 
@@ -1136,128 +1176,134 @@ cannot use <code>$N</code> in the substitution string!
       brackets, of any of the flags in the following table. More
       details, and examples, for each flag, are available in the <a href="../rewrite/flags.html">Rewrite Flags document</a>.</p>
 
-    <table class="bordered">
-    <tr><th>Flag and syntax</th>
+    <table class="bordered"><tr class="header"><th>Flag and syntax</th>
         <th>Function</th>
     </tr>
-    <tr>
+<tr>
         <td>B</td>
-        <td>Escape non-alphanumeric characters <em>before</em> applying
-        the transformation. <em><a href="../rewrite/flags.html#flag_b">details ...</a></em></td>
+        <td>Escape non-alphanumeric characters in backreferences <em>before</em> 
+        applying the transformation. <em><a href="../rewrite/flags.html#flag_b">details ...</a></em></td>
+    </tr>
+<tr class="odd">
+        <td>backrefnoplus|BNP</td>
+        <td>If backreferences are being escaped, spaces should be escaped to 
+        %20 instead of +. Useful when the backreference will be used in the
+        path component rather than the query string.<em><a href="../rewrite/flags.html#flag_bnp">details ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>chain|C</td>
         <td>Rule is chained to the following rule. If the rule fails,
         the rule(s) chained to it will be skipped. <em><a href="../rewrite/flags.html#flag_c">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>cookie|CO=<em>NAME</em>:<em>VAL</em></td>
         <td>Sets a cookie in the client browser. Full syntax is:
         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>
         </td>
     </tr>
-    <tr>
+<tr>
         <td>discardpath|DPI</td>
         <td>Causes the PATH_INFO portion of the rewritten URI to be
         discarded. <em><a href="../rewrite/flags.html#flag_dpi">details
         ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
+        <td>END</td>
+        <td>Stop the rewriting process immediately and don't apply any
+        more rules. Also prevents further execution of rewrite rules
+        in per-directory and .htaccess context. (Available in 2.3.9 and later)
+        <em><a href="../rewrite/flags.html#flag_end">details ...</a></em></td>
+    </tr>
+<tr>
         <td>env|E=[!]<em>VAR</em>[:<em>VAL</em>]</td>
         <td>Causes an environment variable <em>VAR</em> to be set (to the
         value <em>VAL</em> if provided). The form !<em>VAR</em> causes
-        the environment variable <em>VAR</em> to be unset.<em><a href="../rewrite/flags.html#flag_e">details ...</a></em></td>
+        the environment variable <em>VAR</em> to be unset.
+        <em><a href="../rewrite/flags.html#flag_e">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>forbidden|F</td>
         <td>Returns a 403 FORBIDDEN response to the client browser.
         <em><a href="../rewrite/flags.html#flag_f">details ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>gone|G</td>
         <td>Returns a 410 GONE response to the client browser. <em><a href="../rewrite/flags.html#flag_g">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>Handler|H=<em>Content-handler</em></td>
         <td>Causes the resulting URI to be sent to the specified
         <em>Content-handler</em> for processing. <em><a href="../rewrite/flags.html#flag_h">details ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>last|L</td>
         <td>Stop the rewriting process immediately and don't apply any
         more rules. Especially note caveats for per-directory and
-        .htaccess context (see also the END flag). <em><a href="../rewrite/flags.html#flag_end">details ...</a></em></td>
+        .htaccess context (see also the END flag). <em><a href="../rewrite/flags.html#flag_l">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>next|N</td>
         <td>Re-run the rewriting process, starting again with the first
         rule, using the result of the ruleset so far as a starting
         point. <em><a href="../rewrite/flags.html#flag_n">details
         ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>nocase|NC</td>
         <td>Makes the pattern comparison case-insensitive.
         <em><a href="../rewrite/flags.html#flag_nc">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>noescape|NE</td>
         <td>Prevent mod_rewrite from applying hexcode escaping of
         special characters in the result of the rewrite. <em><a href="../rewrite/flags.html#flag_ne">details ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>nosubreq|NS</td>
         <td>Causes a rule to be skipped if the current request is an
         internal sub-request. <em><a href="../rewrite/flags.html#flag_ns">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>proxy|P</td>
         <td>Force the substitution URL to be internally sent as a proxy
         request. <em><a href="../rewrite/flags.html#flag_p">details
         ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>passthrough|PT</td>
         <td>Forces the resulting URI to be passed back to the URL
         mapping engine for processing of other URI-to-filename
         translators, such as <code>Alias</code> or
         <code>Redirect</code>. <em><a href="../rewrite/flags.html#flag_pt">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>qsappend|QSA</td>
         <td>Appends any query string from the original request URL to 
         any query string created in the rewrite target.<em><a href="../rewrite/flags.html#flag_qsa">details ...</a></em></td>
     </tr>
-    <tr>
+<tr>
         <td>qsdiscard|QSD</td>
         <td>Discard any query string attached to the incoming URI.
         <em><a href="../rewrite/flags.html#flag_qsd">details
         ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>redirect|R[=<em>code</em>]</td>
         <td>Forces an external redirect, optionally with the specified
         HTTP status code. <em><a href="../rewrite/flags.html#flag_r">details ...</a></em>
         </td>
     </tr>
-    <tr>
-        <td>END</td>
-        <td>Stop the rewriting process immediately and don't apply any
-        more rules. Also prevents further execution of rewrite rules
-        in per-directory and .htaccess context. (Available in 2.3.9 and later)
-        <em><a href="../rewrite/flags.html#flag_l">details ...</a></em></td>
-    </tr>
-    <tr>
+<tr>
         <td>skip|S=<em>num</em></td>
         <td>Tells the rewriting engine to skip the next <em>num</em>
         rules if the current rule matches. <em><a href="../rewrite/flags.html#flag_s">details ...</a></em></td>
     </tr>
-    <tr>
+<tr class="odd">
         <td>type|T=<em>MIME-type</em></td>
         <td>Force the <a class="glossarylink" href="../glossary.html#mime-type" title="see glossary">MIME-type</a> of the target file
         to be the specified type. <em><a href="../rewrite/flags.html#flag_t">details ...</a></em></td>
     </tr>
-    </table>
+</table>
 
 <div class="note"><h3>Home directory expansion</h3>
 <p> When the substitution string begins with a string
@@ -1280,68 +1326,55 @@ directive.</p>
       /somepath/pathinfo</code>'':</strong><br />
       </p>
 
-<table class="bordered">
-<tr>
+<table class="bordered"><tr class="header">
 <th>Given Rule</th>
 <th>Resulting Substitution</th>
 </tr>
-
 <tr>
 <td>^/somepath(.*) otherpath$1</td>
 <td>invalid, not supported</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) otherpath$1  [R]</td>
 <td>invalid, not supported</td>
 </tr>
-
 <tr>
 <td>^/somepath(.*) otherpath$1  [P]</td>
 <td>invalid, not supported</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) /otherpath$1</td>
 <td>/otherpath/pathinfo</td>
 </tr>
-
 <tr>
 <td>^/somepath(.*) /otherpath$1 [R]</td>
 <td>http://thishost/otherpath/pathinfo via external redirection</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) /otherpath$1 [P]</td>
 <td>doesn't make sense, not supported</td>
 </tr>
-
 <tr>
 <td>^/somepath(.*) http://thishost/otherpath$1</td>
 <td>/otherpath/pathinfo</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) http://thishost/otherpath$1 [R]</td>
 <td>http://thishost/otherpath/pathinfo via external redirection</td>
 </tr>
-
 <tr>
 <td>^/somepath(.*) http://thishost/otherpath$1 [P]</td>
 <td>doesn't make sense, not supported</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) http://otherhost/otherpath$1</td>
 <td>http://otherhost/otherpath/pathinfo via external redirection</td>
 </tr>
-
 <tr>
 <td>^/somepath(.*) http://otherhost/otherpath$1 [R]</td>
 <td>http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^/somepath(.*) http://otherhost/otherpath$1 [P]</td>
 <td>http://otherhost/otherpath/pathinfo via internal proxy</td>
 </tr>
@@ -1355,74 +1388,59 @@ directive.</p>
       /somepath/localpath/pathinfo</code>'':</strong><br />
      </p>
 
-<table class="bordered">
-
-<tr>
+<table class="bordered"><tr class="header">
 <th>Given Rule</th>
 <th>Resulting Substitution</th>
 </tr>
-
 <tr>
 <td>^localpath(.*) otherpath$1</td>
 <td>/somepath/otherpath/pathinfo</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) otherpath$1  [R]</td>
 <td>http://thishost/somepath/otherpath/pathinfo via external
 redirection</td>
 </tr>
-
 <tr>
 <td>^localpath(.*) otherpath$1  [P]</td>
 <td>doesn't make sense, not supported</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) /otherpath$1</td>
 <td>/otherpath/pathinfo</td>
 </tr>
-
 <tr>
 <td>^localpath(.*) /otherpath$1 [R]</td>
 <td>http://thishost/otherpath/pathinfo via external redirection</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) /otherpath$1 [P]</td>
 <td>doesn't make sense, not supported</td>
 </tr>
-
 <tr>
 <td>^localpath(.*) http://thishost/otherpath$1</td>
 <td>/otherpath/pathinfo</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) http://thishost/otherpath$1 [R]</td>
 <td>http://thishost/otherpath/pathinfo via external redirection</td>
 </tr>
-
 <tr>
 <td>^localpath(.*) http://thishost/otherpath$1 [P]</td>
 <td>doesn't make sense, not supported</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) http://otherhost/otherpath$1</td>
 <td>http://otherhost/otherpath/pathinfo via external redirection</td>
 </tr>
-
 <tr>
 <td>^localpath(.*) http://otherhost/otherpath$1 [R]</td>
 <td>http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)</td>
 </tr>
-
-<tr>
+<tr class="odd">
 <td>^localpath(.*) http://otherhost/otherpath$1 [P]</td>
 <td>http://otherhost/otherpath/pathinfo via internal proxy</td>
 </tr>
-
 </table>
 
   
@@ -1449,7 +1467,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_rewrite.ht
     }
 })(window, document);
 //--><!]]></script></div><div id="footer">
-<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
+<p class="apache">Copyright 2014 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
 if (typeof(prettyPrint) !== 'undefined') {
     prettyPrint();