# Used when the whole project is extracted into the document root — the way the ZIP is built.
# Every URL that is not a real file or folder is handed to index.php, which forwards it to the
# front controller in public/. If the document root is public/ itself, this file is ignored.

Options -Indexes
DirectoryIndex index.php
RewriteEngine On

# Never serve the folders that hold the database password, the schema and the PHP classes.
RewriteRule ^(app|config|database|routes|tools)(/|$) - [F,L]

# Docs, SQL dumps and the installer's lock file are not for the browser either.
RewriteRule \.(md|sql|lock|log|ps1)$ - [F,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
