# Orbit Bet — root .htaccess (docroot = this folder, e.g. public_html)

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Block direct web access to private folders.
    RewriteRule ^(app|config|storage|cron)(/|$) - [F,L]

    # Route anything that is not a real file or directory to index.php.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [QSA,L]
</IfModule>

Options -Indexes

# Never serve config or dotfiles.
<FilesMatch "^(config\.php|\.env|composer\.(json|lock))$">
    <IfModule mod_authz_core.c>Require all denied</IfModule>
    <IfModule !mod_authz_core.c>Order allow,deny
Deny from all</IfModule>
</FilesMatch>
