summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2011-04-07 05:14:15 +0200
committerRich Bowen <rbowen@apache.org>2011-04-07 05:14:15 +0200
commit45e80d3ad06ab454a562d3df6251d01c10d50560 (patch)
tree78f425a8900112ddb9199cbc2403221382140f7b /docs/manual/mod
parentAdds an example of how one might actually construct a type-map file. (diff)
downloadapache2-45e80d3ad06ab454a562d3df6251d01c10d50560.tar.xz
apache2-45e80d3ad06ab454a562d3df6251d01c10d50560.zip
Adds an example of constructing a type-map file.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod')
-rw-r--r--docs/manual/mod/mod_negotiation.html.en39
-rw-r--r--docs/manual/mod/mod_negotiation.xml2
-rw-r--r--docs/manual/mod/mod_negotiation.xml.ja2
3 files changed, 41 insertions, 2 deletions
diff --git a/docs/manual/mod/mod_negotiation.html.en b/docs/manual/mod/mod_negotiation.html.en
index dd88482e87..1cf3b7f5a9 100644
--- a/docs/manual/mod/mod_negotiation.html.en
+++ b/docs/manual/mod/mod_negotiation.html.en
@@ -158,6 +158,45 @@ Negotiation</a></li>
</code></p></div>
</dd>
</dl>
+
+ <p>Consider, for example, a resource called
+ <code>document.html</code> which is available in English, French,
+ and German. The files for each of these are called
+ <code>document.html.en</code>, <code>document.html.fr</code>, and
+ <code>document.html.de</code>, respectively. The type map file will
+ be called <code>index.html.var</code>, and will contain the
+ following:</p>
+
+ <div class="example"><h3>index.html.var</h3><p><code>
+
+ Content-language: en<br />
+ Content-type: text/html<br />
+ URI: document.html.en<br />
+ <br />
+ Content-language: fr<br />
+ Content-type: text/html<br />
+ URI: document.html.fr<br />
+ <br />
+ Content-language: de<br />
+ Content-type: text/html<br />
+ URI: document.html.de<br />
+ <br />
+
+ </code></p></div>
+
+ <p>All four of these files should be placed in the same directory,
+ and the <code>.var</code> file should be associated with the
+ <code>type-map</code> handler with an <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> directive:</p>
+
+ <div class="example"><p><code>
+ AddHandler type-map .var
+ </code></p></div>
+
+ <p>A request for <code>document.html</code> in this directory will
+ result in <code>document.html.var</code> being consulted, and the
+ variant chosen which most closely matches the language preference
+ specified in the user's <code>Accept-Language</code> request
+ header.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="multiviews" id="multiviews">Multiviews</a></h2>
diff --git a/docs/manual/mod/mod_negotiation.xml b/docs/manual/mod/mod_negotiation.xml
index 4bec7943b9..5762a76fd4 100644
--- a/docs/manual/mod/mod_negotiation.xml
+++ b/docs/manual/mod/mod_negotiation.xml
@@ -178,7 +178,7 @@ Negotiation</a></seealso>
<example>
AddHandler type-map .var
- <example>
+ </example>
<p>A request for <code>document.html</code> in this directory will
result in <code>document.html.var</code> being consulted, and the
diff --git a/docs/manual/mod/mod_negotiation.xml.ja b/docs/manual/mod/mod_negotiation.xml.ja
index fd67e25735..f67e741188 100644
--- a/docs/manual/mod/mod_negotiation.xml.ja
+++ b/docs/manual/mod/mod_negotiation.xml.ja
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 420990:1066440 (outdated) -->
+<!-- English Revision: 420990:1089714 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more