# miles.kim — one page, read at every address
RewriteEngine On
RewriteBase /
RewriteRule ^(all|writing|art|design|about|visual|verbal|digital)(/[^/]+)?/?$ index.html [L]
RewriteRule ^(far|trial)(/.*)?$ index.html [L]
# the page is revalidated each visit. Pictures and clips are named for their piece, not their content, so one can be
# replaced under its name: they are kept a day, then asked for again. Fonts never change under a name: a year
<IfModule mod_headers.c>
  <FilesMatch "\\.html$">
    Header set Cache-Control "no-cache"
  </FilesMatch>
  <FilesMatch "\\.(jpg|mp4)$">
    Header set Cache-Control "public, max-age=86400, stale-while-revalidate=2592000"
  </FilesMatch>
  <FilesMatch "\\.woff2$">
    Header set Cache-Control "public, max-age=31536000, immutable"
  </FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript image/svg+xml
</IfModule>
AddType font/woff2 .woff2
