1#
2# Provide access to the documentation on your server as
3#  http://yourserver.example.com/manual/
4# The documentation is always available at
5#  http://httpd.apache.org/docs/2.4/
6#
7# Required modules: mod_alias, mod_authz_core, mod_authz_host,
8#                   mod_setenvif, mod_negotiation
9#
10
11AliasMatch ^/manual(?:/(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "@exp_manualdir@$1"
12
13<Directory "@exp_manualdir@">
14    Options Indexes
15    AllowOverride None
16    Require all granted
17
18    <Files *.html>
19        SetHandler type-map
20    </Files>
21    # .tr is text/troff in mime.types!
22    <Files *.html.tr.utf8>
23        ForceType "text/html; charset=utf-8"
24    </Files>
25
26    AddLanguage da .da
27
28    SetEnvIf Request_URI ^/manual/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)/ prefer-language=$1
29    RedirectMatch 301 ^/manual(?:/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)){2,}(/.*)?$ /manual/$1$2
30
31    LanguagePriority en da de es fr ja ko pt-br ru tr
32    ForceLanguagePriority Prefer Fallback
33</Directory>
34