From: Joshua Slive
New in Apache 2.0, some exceptions have been added to the + negotiation algorithm to allow graceful fallback when language + negotiation fails to find a match.
+When a client requests a page on your server, but the server cannot find a single page that matches the Accept-language sent by the browser, the server will return either a "No Acceptable @@ -439,26 +443,28 @@ href="mod_negotiation.html#languagepriority">LanguagePriority directive.
-The ForceLanguagePriority
directive also causes
- Apache to attempt to match language-subsets against their parent
- language when no other match can be obtained. For example, if a
- client requests documents with the language en-GB
for
- British English, the server is not normally allowed by the
- HTTP/1.1 standard to return a document that is marked as simply
+
The server will also attempt to match language-subsets when no
+ other match can be found. For example, if a client requests
+ documents with the language en-GB
for British
+ English, the server is not normally allowed by the HTTP/1.1
+ standard to match that against a document that is marked as simply
en
. (Note that it is almost surely a configuration
error to include en-GB
and not en
in the
Accept-Language header, since it is very unlikely that a reader
understands British English, but doesn't understand English in
general. Unfortunately, many current clients have default
- configurations that resemble this.) With the
- ForceLanguagePriority
header, the server can be
- configured to ignore the subset specification and match
- en-GB
against en
documents. But note
- that if the client requests "en-GB; qs=0.9, fr; qs=0.8", and the
- server has documents designated "en" and "fr", then the "fr"
- document will be returned regardless of the
- ForceLanguagePriority
directive. This is necessary
- to maintain compliance with the HTTP/1.1 specification.
LanguagePriority
, the server will ignore the subset
+ specification and match en-GB
against en
+ documents. Implicitly, Apache will add the parent language to
+ the client's acceptable language list with a very low quality
+ value. But note that if the client requests "en-GB; qs=0.9, fr;
+ qs=0.8", and the server has documents designated "en" and "fr",
+ then the "fr" document will be returned. This is necessary to
+ maintain compliance with the HTTP/1.1 specification and to work
+ effectively with properly configured clients.
New in Apache 2.0, some exceptions have been added to the + negotiation algorithm to allow graceful fallback when language + negotiation fails to find a match.
+When a client requests a page on your server, but the server cannot find a single page that matches the Accept-language sent by the browser, the server will return either a "No Acceptable @@ -439,26 +443,28 @@ href="mod_negotiation.html#languagepriority">LanguagePriority directive.
-The ForceLanguagePriority
directive also causes
- Apache to attempt to match language-subsets against their parent
- language when no other match can be obtained. For example, if a
- client requests documents with the language en-GB
for
- British English, the server is not normally allowed by the
- HTTP/1.1 standard to return a document that is marked as simply
+
The server will also attempt to match language-subsets when no
+ other match can be found. For example, if a client requests
+ documents with the language en-GB
for British
+ English, the server is not normally allowed by the HTTP/1.1
+ standard to match that against a document that is marked as simply
en
. (Note that it is almost surely a configuration
error to include en-GB
and not en
in the
Accept-Language header, since it is very unlikely that a reader
understands British English, but doesn't understand English in
general. Unfortunately, many current clients have default
- configurations that resemble this.) With the
- ForceLanguagePriority
header, the server can be
- configured to ignore the subset specification and match
- en-GB
against en
documents. But note
- that if the client requests "en-GB; qs=0.9, fr; qs=0.8", and the
- server has documents designated "en" and "fr", then the "fr"
- document will be returned regardless of the
- ForceLanguagePriority
directive. This is necessary
- to maintain compliance with the HTTP/1.1 specification.
LanguagePriority
, the server will ignore the subset
+ specification and match en-GB
against en
+ documents. Implicitly, Apache will add the parent language to
+ the client's acceptable language list with a very low quality
+ value. But note that if the client requests "en-GB; qs=0.9, fr;
+ qs=0.8", and the server has documents designated "en" and "fr",
+ then the "fr" document will be returned. This is necessary to
+ maintain compliance with the HTTP/1.1 specification and to work
+ effectively with properly configured clients.
|
ForceLanguagePriority Prefer
The ForceLanguagePriority
directive uses
the given LanguagePriority
to satisfy
negotation where the server could otherwise not return a single
diff --git a/docs/manual/mod/mod_negotiation.xml b/docs/manual/mod/mod_negotiation.xml
index a30ea4f0fa..a16372be99 100644
--- a/docs/manual/mod/mod_negotiation.xml
+++ b/docs/manual/mod/mod_negotiation.xml
@@ -180,7 +180,7 @@ cached by proxy servers