Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (41 sloc) 1.47 KB
#AddType application/xhtml+xml .html
AddType 'text/html; charset=UTF-8' .html
#AddType type-map .html
#AddHandler type-map .html
Options +Includes +MultiViews +FollowSymLinks
DirectoryIndex index
#AddOutputFilter INCLUDES .html
AddLanguage en .en
AddLanguage de .de
AddType text/html cgi-script .cgi
AddHandler cgi-script .cgi
# referrer spam from
# see for an explanation
RewriteEngine on
RewriteCond %{REMOTE_ADDR} ^65\.55\.(104|107|109|110|165|232)
RewriteCond %{HTTP_REFERER} (www\.bing|search\.live)\.com
RewriteCond %{HTTP_REFERER} !\&
RewriteRule .* - [F]
# Redirect to HTTPS
RewriteCond %{HTTPS} "off"
RewriteCond %{REQUEST_URI} !well-known
RewriteRule ^/(.*)$$1 [R,L]
RewriteCond %{HTTPS} "off"
RewriteCond %{REQUEST_URI} !well-known
RewriteRule ^(.*)$$1 [R,L]
SetEnvIf Request_URI ^(de|en) prefer-language=$1
# somehow automatica links suck, and add punctuation at the end
RewriteRule ^/en/article/5-to-6.$ /en/article/5-to-6 [R=301,L]
# top level
RewriteRule ^(de|en)/?$ /index.html.$1 [L]
# first level
RewriteRule ^(de|en)/(.*[^/])$ /$2.html.$1 [L]
RewriteRule ^(de|en)/(.*/)$ /$2/index.html.$1 [L]
# removed .writeback URLs
RewriteRule ^(.*)\.writeback$ /$1.html [R=301,L]
## first level
#RewriteRule ^(de|en)/(.*)/$ /$2/index.html.$1 [L]
#RewriteRule ^(de|en)/(.*)/(.*)$ /$2/$3.html.$1 [L]
LanguagePriority de en
ForceLanguagePriority Prefer Fallback
Something went wrong with that request. Please try again.