Assigning Default Charsets and Language Priorities


DefaultLanguage en AddDefaultCharset iso-8859-1 LanguagePriority en es de


You can specify a default character set for documents without one already associated by using the AddDefaultCharset, as shown in the example. Another option is to specify AddDefaultcharset Off to disable adding a character set for documents without one associated.

You can specify a default language with the DefaultLanguage directive. For a website in English, that would be en, as shown in the example.

Finally, if the client does not provide a language preference, you can use LanguagePriority to determine the preferred language order. In this example, if a document in English is found, it will be served. Otherwise, Apache will look for a document in Spanish, and if that is not found, Apache will look for a document in German. You can learn more about this topic at http://httpd.apache.org/docs/2.0/mod/mod_negotiation.html and http://httpd.apache.org/docs/2.0/mod/mod_mime.html.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net