X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=docs%2Fmanual%2Fmod%2Fmod_negotiation.html.en;h=8592ebd5a031c666f619876b59e8fbb6e6dc4a1b;hb=0ae5b1af6b6bf3048d2a124e84905f63d6507dea;hp=b08d99c56aa5d8edc0732c5c2c1861fb12060249;hpb=05d4dddbd9249dfc5998cf8f2b27a830720b7044;p=apache diff --git a/docs/manual/mod/mod_negotiation.html.en b/docs/manual/mod/mod_negotiation.html.en index b08d99c56a..8592ebd5a0 100644 --- a/docs/manual/mod/mod_negotiation.html.en +++ b/docs/manual/mod/mod_negotiation.html.en @@ -1,27 +1,33 @@ - -mod_negotiation - Apache HTTP Server +mod_negotiation - Apache HTTP Server Version 2.5 - + + + + +

Apache HTTP Server Version 2.5

+
<-
-Apache > HTTP Server > Documentation > Version 2.3 > Modules
+Apache > HTTP Server > Documentation > Version 2.5 > Modules

Apache Module mod_negotiation

Available Languages:  en  | + fr  |  ja 

@@ -40,30 +46,30 @@ type-map) which explicitly lists the files containing the variants. -
  • A MultiViews search (enabled by the MultiViews +
  • A Multiviews search (enabled by the Multiviews Options), where the server does an implicit filename pattern match, and choose from amongst the results.
  • -
    top

    Type maps

    @@ -113,8 +119,8 @@ Negotiation 0.
    qs
    -
    a floating-point number with a value in the range 0.0 - to 1.0, indicating the relative 'quality' of this variant +
    a floating-point number with a value in the range 0[.000] + to 1[.000], indicating the relative 'quality' of this variant compared to the other available variants, independent of the client's capabilities. For example, a jpeg file is usually of higher source quality than an ascii file if it @@ -134,12 +140,12 @@ Negotiation
    uri of the file containing the variant (of the given media type, encoded with the given content encoding). These are interpreted as URLs relative to the map file; they must - be on the same server (!), and they must refer to files to + be on the same server, and they must refer to files to which the client would be granted access if they were to be requested directly.
    Body:
    -
    New in Apache 2.0, the actual content of the resource may +
    The actual content of the resource may be included in the type-map file using the Body header. This header must contain a string that designates a delimiter for the body content. Then all following lines in the type map @@ -157,10 +163,56 @@ 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 document.html.var, and will contain the + following:

    + +

    + URI: document.html
    +
    + 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.var in this directory will + result in choosing the variant which most closely matches the language preference + specified in the user's Accept-Language request + header.

    + +

    If Multiviews is enabled, and MultiviewsMatch is set to "handlers" or "any", a request to + document.html will discover document.html.var and + continue negotiating with the explicit type map.

    + +

    Other configuration directives, such as Alias can be used to map document.html to + document.html.var.

    +
    top
    -

    MultiViews

    -

    A MultiViews search is enabled by the MultiViews +

    Multiviews

    +

    A Multiviews search is enabled by the Multiviews Options. If the server receives a request for /some/dir/foo and /some/dir/foo does not exist, then the @@ -171,7 +223,7 @@ Negotiation of them by name. It then chooses the best match to the client's requirements, and returns that document.

    -

    The MultiViewsMatch +

    The MultiviewsMatch directive configures whether Apache will consider files that do not have content negotiation meta-information assigned to them when choosing files.

    @@ -179,14 +231,13 @@ Negotiation
    top
    Description:Provides for content negotiation
    - -
    Description:Allows content-negotiated documents to be +
    Description:Allows content-negotiated documents to be cached by proxy servers
    Syntax:CacheNegotiatedDocs On|Off
    Default:CacheNegotiatedDocs Off
    Context:server config, virtual host
    Status:Base
    Module:mod_negotiation
    Compatibility:The syntax changed in version 2.0.

    If set, this directive allows content-negotiated documents to be cached by proxy servers. This could mean that clients @@ -199,16 +250,12 @@ cached by proxy servers the caching of negotiated documents, and this directive has no effect in responses to HTTP/1.1 requests.

    -

    Prior to version 2.0, - CacheNegotiatedDocs did not take an - argument; it was turned on by the presence of the directive by - itself.

    top

    ForceLanguagePriority Directive

    - @@ -216,11 +263,10 @@ found -
    Description:Action to take if a single acceptable document is not +
    Description:Action to take if a single acceptable document is not found
    Syntax:ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback]
    Default:ForceLanguagePriority Prefer
    Override:FileInfo
    Status:Base
    Module:mod_negotiation
    Compatibility:Available in version 2.0.30 and later

    The ForceLanguagePriority directive uses the given LanguagePriority to satisfy - negotation where the server could otherwise not return a single + negotiation where the server could otherwise not return a single matching document.

    ForceLanguagePriority Prefer uses @@ -232,10 +278,9 @@ found (equally acceptable) then the first matching variant, en, will be served.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Prefer -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Prefer
    +

    ForceLanguagePriority Fallback uses LanguagePriority to @@ -245,10 +290,9 @@ found language response, but such a variant isn't found, then the first variant from the LanguagePriority list below will be served.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Fallback -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Fallback
    +

    Both options, Prefer and Fallback, may be specified, so either the first matching variant from LanguagePriority will be served if @@ -275,12 +319,11 @@ the client does not express a preference

    The LanguagePriority sets the precedence of language variants for the case where the client does not - express a preference, when handling a MultiViews request. The list + express a preference, when handling a Multiviews request. The list of MIME-lang are in order of decreasing preference.

    -

    Example:

    - LanguagePriority en fr de -

    +
    LanguagePriority en fr de
    +

    For a request for foo.html, where foo.html.fr and foo.html.de both @@ -300,8 +343,30 @@ the client does not express a preference

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file