# Phina Consultant Limited — static site

Options -Indexes
ErrorDocument 404 /404.html

# Force HTTPS (safe once an SSL certificate is installed in cPanel)
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteCond %{HTTP:X-Forwarded-Proto} !https
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

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

# Caching
<IfModule mod_headers.c>
  <FilesMatch "\.(?:css|js|svg|png|jpe?g|gif|webp|ico|woff2?)$">
    Header set Cache-Control "public, max-age=2592000"
  </FilesMatch>
  <FilesMatch "\.(?:html|xml|txt)$">
    Header set Cache-Control "public, max-age=0, must-revalidate"
  </FilesMatch>
</IfModule>
