# Safety net for shared hosting (cPanel etc.) where the domain's folder
# can't be pointed at public/. Copy to the app root as `.htaccess`:
# it sends every request into public/ and refuses the private files.
# If you CAN set the document root to public/, do that instead.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(\.env|\.git|composer\.(json|lock)|artisan|storage|bootstrap|config|database|vendor|app|routes|resources|tests|imports|deploy) - [F,L,NC]
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

<FilesMatch "^\.">
    Require all denied
</FilesMatch>
