<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /app/

  # Don't rewrite real files
  RewriteCond %{REQUEST_FILENAME} !-f

  # Don't rewrite real directories
  RewriteCond %{REQUEST_FILENAME} !-d

  # Route all other requests to index.html
  RewriteRule . /app/index.html [L]
</IfModule>

# Cache static assets
<FilesMatch "\.(css|js|svg|png|jpg|jpeg|gif|woff|woff2|ttf|eot)$">
  <IfModule mod_headers.c>
    Header set Cache-Control "public, max-age=31536000, immutable"
  </IfModule>
</FilesMatch>

DirectoryIndex index.html
