Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Protect every non-public project directory when hosting cannot select www as DocumentRoot.
    RewriteRule ^(?:app|bin|config|database|docs|emails|files|licenses|log|temp|vendor)(?:/|$) - [F,NC,L]

    # Internally forward all public requests to the real document root.
    RewriteRule ^$ www/ [L]
    RewriteCond %{REQUEST_URI} !^/www/
    RewriteRule ^(.*)$ www/$1 [L]
</IfModule>

<FilesMatch "^(?:composer\.(?:json|lock)|README\.md|LICENSE\.md)$">
    Require all denied
</FilesMatch>
