Options -Indexes
DirectoryIndex index.php

<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
    SetHandler  application/x-lsphp80
</FilesMatch>

RewriteEngine On

# Keep application code, credentials, and project metadata out of public requests.
RewriteRule ^(?:app|bin|database|storage|tests|android|vendor)(?:/|$) - [F,L,NC]
RewriteRule ^\.(?!well-known(?:/|$)) - [F,L]
RewriteRule ^(?:composer\.(?:json|lock)|phpunit\.xml|README\.md|API\.md|CLAUDE\.md)$ - [F,L,NC]

# Let the public directory keep its own routing rules. Existing root files,
# including index.php, are served directly; other paths are resolved in public/.
RewriteRule ^public(?:/|$) - [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(.+)$ public/$1 [L,QSA]
