# VisionMint demo: static site on Apache shared hosting (cPanel or similar).

# Own rewrite context, so rules from a WordPress .htaccess higher up do not reach this folder
RewriteEngine On

Options -Indexes
DirectoryIndex index.html
ErrorDocument 404 /404.html

# Keep the demo out of search engines (the pages and robots.txt say the same)
<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow"
</IfModule>

# File types some servers do not know yet
AddType image/avif .avif
AddType font/woff2 .woff2
AddType application/json .json
AddType video/webm .webm
AddType video/mp4 .mp4

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

# Caching: build files have hashed names and never change; pages are always fresh
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 hour"
  ExpiresByType text/html "access plus 0 seconds"
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType image/avif "access plus 1 month"
  ExpiresByType image/webp "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType application/json "access plus 1 day"
</IfModule>

# Turn on once SSL works for the subdomain (remove the # in front of the two lines):
# RewriteCond %{HTTPS} off
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
