# Siyaz'enzela cPanel deployment
# Serves index.html (which redirects to the live app) as the default document
# and forwards any deep link so /login, /auth/patient, etc. all reach the portal.

DirectoryIndex index.html
Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Let real files (icon, manifest, favicon, index.html) serve directly
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Everything else -> published Siyaz'enzela app, preserving the path + query
  RewriteRule ^(.*)$ https://care-anywhere-mobile.lovable.app/$1 [R=302,L,QSA]
</IfModule>

<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

<IfModule mod_mime.c>
  AddType application/manifest+json .webmanifest
  AddType image/x-icon .ico
</IfModule>
