DirectoryIndex index
Options +MultiViews
ForceLanguagePriority Fallback
AddDefaultCharset utf-8
RewriteEngine On
# Redirect to /index on http://server.de/
RewriteCond %{REQUEST_URI} =/
RewriteRule .* http://%{HTTP_HOST}/index [R=301,L]
# Tried to combine that with [OR], didn't work.
# The special User-Agent comparison is for the W3 Validator that doesn't send application/xhtml+xml in his Accept header.
RewriteCond %{HTTP_USER_AGENT} W3C_Validator [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.html$
RewriteRule .* - [T=application/xhtml+xml;charset=utf-8]
RewriteCond %{HTTP_USER_AGENT} W3C_Validator [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [T=application/xhtml+xml;charset=utf-8]
# Rewrite moved URLs.
RewriteRule ^/gtk4vc\.zip http://%{HTTP_HOST}/gtk/packages-for-msvc.zip [R=301,L]
# NOTE: Should be done in another way, to prevent .xml files in the directory from being opened by clients that prefer plain XML documents over XHTML.
<Files *.xml>
Deny from all
</Files>