<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Send everything that isn't a real file or folder to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

# Optional: prevent access to system and application directories
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

<FilesMatch "^index\.php$">
    Require all granted
</FilesMatch>

<Files ~ "\.(env|log|md|sql)$">
    Order allow,deny
    Deny from all
</Files>
