# Identity Auto Fabricators website (preview on identity.alitdigital.com)
DirectoryIndex index.html
Options -Indexes

# Always use HTTPS
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP:X-Forwarded-Proto} !https
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Keep the preview out of search results (remove when this moves to Identity's live domain)
<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow"
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# File types
AddType video/mp4 .mp4
AddType font/woff2 .woff2
AddType application/javascript .js
AddType text/css .css

# Compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript text/plain image/svg+xml
</IfModule>

# Browser caching: photos, video and fonts for 30 days; pages, CSS and JS for 1 hour so updates show quickly
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/jpeg "access plus 30 days"
  ExpiresByType image/png "access plus 30 days"
  ExpiresByType video/mp4 "access plus 30 days"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType text/css "access plus 1 hour"
  ExpiresByType application/javascript "access plus 1 hour"
  ExpiresByType text/html "access plus 0 seconds"
</IfModule>
