# Protects everything outside public/ when this folder is placed inside public_html, and sends visitors to public/.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(app|storage|tools|vendor)(/|$) - [F,L]
RewriteRule ^(README|REVIEW)\.md$ - [F,L]
# Opening this folder itself goes to the site in public/.
RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
RewriteRule ^(.*)$ - [E=SH_ROOT:%1]
RewriteRule ^$ %{ENV:SH_ROOT}public/ [R=302,L]
RewriteRule ^\.env - [F,L]
</IfModule>
<FilesMatch "^\.">
    Require all denied
</FilesMatch>
