Stibo/yggdrasil-light/master/www/.htaccess - Htaccess File

Stibo/yggdrasil-light/master/www/.htaccess

ErrorDocument 404 /404.html
ErrorDocument 403 /403.html

#@__HCP_END__@#
# Anything after the comment above is left alone

# MIME-Types
<IfModule mod_mime.c>
  # Audio
  AddType audio/mp4                  m4a f4a f4b
  AddType audio/ogg                  oga ogg

  # JavaScript
  # Normalize to standard type (it's sniffed in IE anyways):
  # http://tools.ietf.org/html/rfc4329#section-7.2
  AddType application/javascript            js
  AddType application/json              json

  # Video
  AddType video/mp4                  f4v f4p m4v mp4
  AddType video/ogg                  ogv
  AddType video/webm                  webm
  AddType video/x-flv                  flv

  # Web fonts
  AddType application/font-woff            woff
  AddType application/vnd.ms-fontobject        eot

  # Browsers usually ignore the font MIME types and sniff the content,
  # however, Chrome shows a warning if other MIME types are used for the
  # following fonts.
  AddType application/x-font-ttf            ttc ttf
  AddType font/opentype                otf

  # Make SVGZ fonts work on iPad:
  # https://twitter.com/FontSquirrel/status/14855840545
  AddType image/svg+xml                svgz

  AddEncoding gzip                  svgz

  # Other
  AddType application/octet-stream                    safariextz
  AddType application/x-chrome-extension              crx
  AddType application/x-opera-extension               oex
  AddType application/x-web-app-manifest+json         webapp
  AddType application/x-xpinstall                     xpi
  AddType application/xml                             atom rdf rss xml
  AddType image/webp                  webp
  AddType image/x-icon                                cur
  AddType text/cache-manifest                         appcache manifest
  AddType text/vtt                  vtt
  AddType text/x-component                            htc
  AddType text/x-vcard                                vcf

</IfModule>

# Force UTF-8
AddDefaultCharset utf-8

<IfModule mod_mime.c>
  AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
</IfModule>

# eTag
<IfModule mod_headers.c>
  Header unset ETag
</IfModule>

FileETag None

# HTTP Caching
<IfModule mod_expires.c>
  Header set cache-control: public
  ExpiresActive on

  ExpiresByType application/font-woff        "access plus 1 year"
  ExpiresByType application/vnd.ms-fontobject     "access plus 1 year"
  ExpiresByType application/x-font-ttf            "access plus 1 year"
  ExpiresByType font/opentype                     "access plus 1 year"
  ExpiresByType image/svg+xml                     "access plus 1 year"

  ExpiresByType image/ico              "access plus 1 year"
  ExpiresByType image/png             "access plus 1 week"
  ExpiresByType image/jpeg            "access plus 1 week"

  ExpiresByType text/html              "access plus 1 week"
  ExpiresByType text/css              "access plus 1 week"
  ExpiresByType application/javascript      "access plus 1 week"
  ExpiresByType application/xml          "access plus 1 week"
</IfModule>

# Compression
<IfModule mod_deflate.c>
  <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)s*,?s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
  </IfModule>

  <IfModule mod_filter.c>
  AddOutputFilterByType DEFLATE application/atom+xml 
                                application/javascript 
                                application/json 
                                application/rss+xml 
                                application/vnd.ms-fontobject 
                                application/x-font-ttf 
                                application/font-woff  
                                application/x-web-app-manifest+json 
                                application/xhtml+xml 
                                application/xml 
                                font/opentype 
                                image/svg+xml 
                                image/x-icon 
                                text/css 
                                text/html 
                                text/plain 
                                text/x-component 
                                text/xml
  </IfModule>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE

Comments

Apache