summaryrefslogtreecommitdiffstats
path: root/docs/manual/rewrite/rewritemap.xml
diff options
context:
space:
mode:
authorKen Coar <coar@apache.org>2015-04-15 21:10:38 +0200
committerKen Coar <coar@apache.org>2015-04-15 21:10:38 +0200
commit45c7b5bc133d9da7bb179574541d99680660ca86 (patch)
tree9f561d6a70ace3a4336752b726928b546b8f9a57 /docs/manual/rewrite/rewritemap.xml
parentQuote path/URL arguments to Proxy* directives. (diff)
downloadapache2-45c7b5bc133d9da7bb179574541d99680660ca86.tar.xz
apache2-45c7b5bc133d9da7bb179574541d99680660ca86.zip
Break <highlight language="commit">foo</highlight> into separate lines.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/rewrite/rewritemap.xml')
-rw-r--r--docs/manual/rewrite/rewritemap.xml24
1 files changed, 16 insertions, 8 deletions
diff --git a/docs/manual/rewrite/rewritemap.xml b/docs/manual/rewrite/rewritemap.xml
index 9b4dc93197..0b33e52690 100644
--- a/docs/manual/rewrite/rewritemap.xml
+++ b/docs/manual/rewrite/rewritemap.xml
@@ -60,7 +60,9 @@ configuration.</note>
<p>The syntax of the <code>RewriteMap</code> directive is as
follows:</p>
-<highlight language="config">RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em></highlight>
+<highlight language="config">
+RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em>
+</highlight>
<p>The <a id="mapfunc" name="mapfunc"><em>MapName</em></a> is an
arbitray name that you assign to the map, and which you will use in
@@ -84,15 +86,21 @@ configuration.</note>
<p>For example, you can define a
<directive>RewriteMap</directive> as:</p>
- <highlight language="config">RewriteMap examplemap txt:/path/to/file/map.txt</highlight>
+ <highlight language="config">
+RewriteMap examplemap txt:/path/to/file/map.txt
+ </highlight>
<p>You would then be able to use this map in a
<directive>RewriteRule</directive> as follows:</p>
-<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1}</highlight>
+ <highlight language="config">
+RewriteRule ^/ex/(.*) ${examplemap:$1}
+ </highlight>
<p>A default value can be specified in the event that nothing is found
in the map:</p>
-<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html}</highlight>
+<highlight language="config">
+RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html}
+</highlight>
<note><title>Per-directory and .htaccess context</title>
<p>
@@ -139,7 +147,6 @@ may be used, and give examples of each.</p>
<p> <strong>Redirect a URI to an all-lowercase version of itself</strong></p>
<highlight language="config">
-
RewriteMap lc int:tolower
RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
</highlight>
@@ -211,7 +218,9 @@ telephone 328
scope. If you're planning to use this in a <code>.htaccess</code>
file, you'll need to remove the leading slash from the rewrite
pattern in order for it to match anything:
- <highlight language="config">RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]</highlight>
+ <highlight language="config">
+RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]
+ </highlight>
</note>
<note><title>Cached lookups</title>
@@ -362,10 +371,9 @@ by many requests.
<p>A simple example is shown here which will replace all dashes with
underscores in a request URI.</p>
-
+
<p><strong>Rewrite configuration</strong></p>
<highlight language="config">
-
RewriteMap d2u prg:/www/bin/dash2under.pl apache:apache<br />
RewriteRule - ${d2u:%{REQUEST_URI}}
</highlight>