From: Rich Bowen Date: Thu, 7 Apr 2011 03:14:15 +0000 (+0000) Subject: Adds an example of constructing a type-map file. X-Git-Tag: 2.3.12~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45e80d3ad06ab454a562d3df6251d01c10d50560;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/mod/mod_negotiation.html.en b/docs/manual/mod/mod_negotiation.html.en index dd88482e871..1cf3b7f5a93 100644 --- a/docs/manual/mod/mod_negotiation.html.en +++ b/docs/manual/mod/mod_negotiation.html.en @@ -158,6 +158,45 @@ Negotiation

+ +

Consider, for example, a resource called + document.html which is available in English, French, + and German. The files for each of these are called + document.html.en, document.html.fr, and + document.html.de, respectively. The type map file will + be called index.html.var, and will contain the + following:

+ +

index.html.var

+ + Content-language: en
+ Content-type: text/html
+ URI: document.html.en
+
+ Content-language: fr
+ Content-type: text/html
+ URI: document.html.fr
+
+ Content-language: de
+ Content-type: text/html
+ URI: document.html.de
+
+ +

+ +

All four of these files should be placed in the same directory, + and the .var file should be associated with the + type-map handler with an AddHandler directive:

+ +

+ AddHandler type-map .var +

+ +

A request for document.html in this directory will + result in document.html.var being consulted, and the + variant chosen which most closely matches the language preference + specified in the user's Accept-Language request + header.

top

Multiviews

diff --git a/docs/manual/mod/mod_negotiation.xml b/docs/manual/mod/mod_negotiation.xml index 4bec7943b9f..5762a76fd44 100644 --- a/docs/manual/mod/mod_negotiation.xml +++ b/docs/manual/mod/mod_negotiation.xml @@ -178,7 +178,7 @@ Negotiation AddHandler type-map .var - +

A request for document.html in this directory will result in document.html.var being consulted, and the diff --git a/docs/manual/mod/mod_negotiation.xml.ja b/docs/manual/mod/mod_negotiation.xml.ja index fd67e25735c..f67e7411885 100644 --- a/docs/manual/mod/mod_negotiation.xml.ja +++ b/docs/manual/mod/mod_negotiation.xml.ja @@ -1,7 +1,7 @@ - +