RewriteEngine On
RewriteBase /
# Prevent direct access to app/ and storage/
RewriteRule ^(app|storage)/ - [F,L]

# Default document
DirectoryIndex index.php
