diff --git a/src/_h5ai/.htaccess b/src/_h5ai/.htaccess index 9540a5a2..d9ff56e5 100644 --- a/src/_h5ai/.htaccess +++ b/src/_h5ai/.htaccess @@ -1,45 +1,115 @@ -Options -Indexes - DirectoryIndex index.html - - Header set Cache-Control "public" - ExpiresActive on - # Perhaps better to whitelist expires rules? Perhaps. - ExpiresDefault "access plus 1 month" - # cache.manifest needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5) - ExpiresByType text/cache-manifest "access plus 0 seconds" - # your document html - ExpiresByType text/html "access plus 0 seconds" +# ------------------------------------------------------------------------------ +# | File access | +# ------------------------------------------------------------------------------ - # data - ExpiresByType text/xml "access plus 0 seconds" - ExpiresByType application/xml "access plus 0 seconds" - ExpiresByType application/json "access plus 0 seconds" +# Block access to directories without a default document. +# Usually you should leave this uncommented because you shouldn't allow anyone +# to surf through every directory on your server (which may includes rather +# private places like the CMS's directories). + + + Options -Indexes + + + + + +# ------------------------------------------------------------------------------ +# | Better website experience | +# ------------------------------------------------------------------------------ + +# Force IE to render pages in the highest available mode in the various +# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf. +# Use, if installed, Google Chrome Frame. + + + Header set X-UA-Compatible "IE=edge,chrome=1" + # `mod_headers` can't match based on the content-type, however, we only + # want to send this header for HTML pages and not for the other resources + + Header unset X-UA-Compatible + + + + + + +# ------------------------------------------------------------------------------ +# | UTF-8 encoding | +# ------------------------------------------------------------------------------ + +# Use UTF-8 encoding for anything served as `text/html` or `text/plain`. +AddDefaultCharset utf-8 + +# Force UTF-8 for certain file formats. + + AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml + + + + + +# ------------------------------------------------------------------------------ +# | Expires headers (for better cache control) | +# ------------------------------------------------------------------------------ + +# The following expires headers are set pretty far in the future. If you don't +# control versioning with filename-based cache busting, consider lowering the +# cache time for resources like CSS and JS to something like 1 week. + + + + ExpiresActive on + ExpiresDefault "access plus 1 month" + + # CSS + ExpiresByType text/css "access plus 1 week" + + # Data interchange + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + + # Favicon (cannot be renamed!) + ExpiresByType image/x-icon "access plus 1 week" + + # HTML components (HTCs) + ExpiresByType text/x-component "access plus 1 month" + + # HTML + ExpiresByType text/html "access plus 0 seconds" + + # JavaScript + ExpiresByType application/javascript "access plus 1 week" + + # Manifest files + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + + # Media + ExpiresByType audio/ogg "access plus 1 month" + ExpiresByType image/gif "access plus 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType video/mp4 "access plus 1 month" + ExpiresByType video/ogg "access plus 1 month" + ExpiresByType video/webm "access plus 1 month" + + # Web feeds + ExpiresByType application/atom+xml "access plus 1 hour" + ExpiresByType application/rss+xml "access plus 1 hour" + + # Web fonts + ExpiresByType application/font-woff "access plus 1 month" + ExpiresByType application/vnd.ms-fontobject "access plus 1 month" + ExpiresByType application/x-font-ttf "access plus 1 month" + ExpiresByType font/opentype "access plus 1 month" + ExpiresByType image/svg+xml "access plus 1 month" - # media: images, video, audio - ExpiresByType image/gif "access plus 1 month" - ExpiresByType image/png "access plus 1 month" - ExpiresByType image/jpg "access plus 1 month" - ExpiresByType image/jpeg "access plus 1 month" - ExpiresByType video/ogg "access plus 1 month" - ExpiresByType audio/ogg "access plus 1 month" - ExpiresByType video/mp4 "access plus 1 month" - ExpiresByType video/webm "access plus 1 month" - - # webfonts - ExpiresByType font/truetype "access plus 1 month" - ExpiresByType font/opentype "access plus 1 month" - ExpiresByType font/woff "access plus 1 month" - ExpiresByType image/svg+xml "access plus 1 month" - ExpiresByType application/vnd.ms-fontobject "access plus 1 month" - - # css and javascript - ExpiresByType text/css "access plus 1 month" - ExpiresByType application/javascript "access plus 1 month" - ExpiresByType text/javascript "access plus 1 month"