woocode / sa-auto / conf / apache22 / extra / httpd-manual.conf

# Provide access to the documentation on your server as
# The documentation is always available at
# Required modules: mod_alias, mod_setenvif, mod_negotiation

AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru|tr))?(/.*)?$ "/apps/svr/apache22/manual$1"

<Directory "/apps/svr/apache22/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

    <Files *.html>
        SetHandler type-map
    # .tr is text/troff in mime.types!
    <Files *>
        ForceType text/html

    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br|ru|tr)/ prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br|ru|tr)){2,}(/.*)?$ /manual/$1$2

    LanguagePriority en de es fr ja ko pt-br ru tr
    ForceLanguagePriority Prefer Fallback