noorus/chat-ng/master/client/.htaccess - Htaccess File

noorus/chat-ng/master/client/.htaccess

# Everything we do is in utf-8
AddDefaultCharset utf-8

# Explicitly set the index
DirectoryIndex index.html

# No autoindexing
<IfModule mod_autoindex.c>
  Options -Indexes
</IfModule>

# Don't serve dot-stuff
<IfModule mod_rewrite.c>
  RewriteCond %{SCRIPT_FILENAME} -d [OR]
  RewriteCond %{SCRIPT_FILENAME} -f
  RewriteRule "(^|/)." - [F]
</IfModule>

# Compression (from h5bp)
<IfModule mod_deflate.c>
  # Force compression for mangled headers
  <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/ld+json 
      application/rss+xml 
      application/vnd.ms-fontobject 
      application/x-font-ttf 
      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>

# Aggressive caching for static resources
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault A1
  ExpiresByType text/html A1
  ExpiresByType image/gif A31536000
  ExpiresByType image/jpeg A31536000
  ExpiresByType image/png A31536000
  ExpiresByType text/css A604800
  ExpiresByType text/javascript A216000
  ExpiresByType application/x-javascript A216000
</IfModule>

# Make sure IE users render with the best engine
# Mark every resource as public to maximize cacheability
# Prevent mobile network providers from modifying the website's content
# Remove ETags since we're using expiry headers
<IfModule mod_headers.c>
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  Header set Cache-Control "public,no-transform"
  Header unset ETag
</IfModule>

FileETag None

On Github License

Files

Download PDF of Htaccess file
DEFLATE, SCRIPT_FILENAME, static

Comments

Apache