httpd-manual.conf 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. AliasMatch ^/manual(?:/(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "${SRVROOT}/manual$1"
  11. <Directory "${SRVROOT}/manual">
  12. Options Indexes
  13. AllowOverride None
  14. Require all granted
  15. <Files *.html>
  16. SetHandler type-map
  17. </Files>
  18. # .tr is text/troff in mime.types!
  19. RemoveType tr
  20. # Traditionally, used .dk filename extension for da language
  21. AddLanguage da .da
  22. SetEnvIf Request_URI ^/manual/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)/ prefer-language=$1
  23. RedirectMatch 301 ^/manual(?:/(da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn)){2,}(/.*)?$ /manual/$1$2
  24. # Reflect the greatest effort in translation (most content available),
  25. # inferring greater attention to detail (potentially false assumption,
  26. # counting translations presently in-sync would be more helpful.)
  27. # Use caution counting; safest pattern is '*.xml.XX'. Recent .xml source
  28. # document count: 266 214 110 94 82 25 22 18 4 1 1
  29. LanguagePriority en fr ko ja tr es de zh-cn pt-br da ru
  30. ForceLanguagePriority Prefer Fallback
  31. </Directory>