# MIME types
AddType text/css .css
AddType text/html .html
AddType text/xml .xml
AddType application/font-woff .woff
# The feed is an atom feed
<Files "feed.xml">
AddType application/atom+xml .xml
</Files>
# Set the correct encodings and language
DefaultLanguage en-GB
AddDefaultCharset UTF-8
AddCharset UTF-8 .html
AddCharset UTF-8 .css
AddCharset UTF-8 .xml
# Allow caching of static resources
ExpiresActive on
ExpiresDefault "access plus 1 week"
ExpiresByType image/png "access plus 1 month"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType text/html "access plus 0 seconds"
# Enable strict transport security with a max age of 120 days
Header set Strict-Transport-Security "max-age=10368000" env=HTTPS
# Security options
Options -MultiViews -Indexes
# Trailing slash
RewriteEngine On
RewriteBase /
DirectorySlash Off
RewriteRule ^(.*)/$ $1 [R=301,L]
RewriteRule ^([wd/-]+)$ $1/index.html [L,T=text/html]