]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
A small example of RewriteMap.
authorRich Bowen <rbowen@apache.org>
Thu, 23 Jun 2005 01:02:13 +0000 (01:02 +0000)
committerRich Bowen <rbowen@apache.org>
Thu, 23 Jun 2005 01:02:13 +0000 (01:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@193034 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_rewrite.html.en
docs/manual/mod/mod_rewrite.xml

index eb27a64d6b8b7a3acf1d9c31d31f02eb8cc83528..cc066042dfc2f0a5cfa9febd5b4fbfebecb1bbb7 100644 (file)
@@ -967,6 +967,20 @@ Apache 2.0.41 and later</td></tr>
       substituted by <em>DefaultValue</em> or by the empty string
       if no <em>DefaultValue</em> was specified.</p>
 
+      <p>For example, you might define a
+      <code class="directive">RewriteMap</code> as:</p>
+
+      <div class="example"><p><code>
+      RewriteMap examplemap txt:/path/to/file/map.txt
+      </code></p></div>
+
+      <p>You would then be able to use this map in a
+      <code class="directive">RewriteRule</code> as follows:</p>
+
+      <div class="example"><p><code>
+      RewriteRule ^/ex/(.*) %{examplemap:$1}
+      </code></p></div>
+
       <p>The following combinations for <em>MapType</em> and
       <em>MapSource</em> can be used:</p>
 
index ac62aa5181a8f59fef84ee2eba73facc1b1572f6..fb9d8cba16d65a9b9bff3474be818d888986603f 100644 (file)
@@ -496,6 +496,20 @@ Apache 2.0.41 and later</compatibility>
       substituted by <em>DefaultValue</em> or by the empty string
       if no <em>DefaultValue</em> was specified.</p>
 
+      <p>For example, you might define a
+      <directive>RewriteMap</directive> as:</p>
+
+      <example>
+      RewriteMap examplemap txt:/path/to/file/map.txt
+      </example>
+
+      <p>You would then be able to use this map in a
+      <directive>RewriteRule</directive> as follows:</p>
+
+      <example>
+      RewriteRule ^/ex/(.*) %{examplemap:$1}
+      </example>
+
       <p>The following combinations for <em>MapType</em> and
       <em>MapSource</em> can be used:</p>