# php -- BEGIN cPanel-generated handler, do not edit
# This domain inherits the “PHP” package.
# php -- END cPanel-generated handler, do not edit

# Parmes web app (app.parmes.ir): a single-page app, so every path that is not a real file
# (/login, /chat/123, …) is served by index.html and the app's router takes it from there.
Options -Indexes
DirectoryIndex index.html

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^\.well-known/ - [L]
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]
  RewriteRule ^ index.html [L]
</IfModule>

<IfModule mod_mime.c>
  AddType application/wasm .wasm
  AddType text/javascript .mjs
  AddType application/manifest+json .webmanifest
</IfModule>

<IfModule mod_headers.c>
  # The page and its loaders must always be fresh, so a release reaches everyone at once.
  <FilesMatch "^(index\.html|flutter_bootstrap\.js|flutter_service_worker\.js|push_sw\.js|manifest\.webmanifest|version\.json)$">
    Header set Cache-Control "no-cache, must-revalidate"
  </FilesMatch>
</IfModule>
