Options -Indexes
RewriteEngine On

# Block dotfiles (.env, .git ...) everywhere.
RewriteRule (^|/)\. - [F,L]

# Serve everything from /public so the site works when this folder is the web
# root (shared hosting) and under /chat_box/ on XAMPP. app/, storage/, .env and
# mail.log are never reachable because they do not exist inside public/.
RewriteCond %{REQUEST_URI} !(^|/)public(/|$)
RewriteRule ^(.*)$ public/$1 [L]
