# CareLite public site — clean URLs.
Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  RewriteRule ^sitemap\.xml$ sitemap.php [L]
  RewriteRule ^robots\.txt$  robots.php  [L]
  RewriteRule ^llms\.txt$   llms.php    [L]

  # Anything that is not a real file or folder becomes a page slug
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([a-z0-9\-]+)/?$ index.php?p=$1 [L,QSA]
</IfModule>

<FilesMatch "\.(sql|md|log)$">
  Require all denied
</FilesMatch>
RedirectMatch 403 ^/lib/.*$

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