# Projekt-Root: Anfragen nach public/ durchreichen (auch in Unterverzeichnissen wie /api).
<IfModule mod_rewrite.c>
    RewriteEngine On
    DirectoryIndex index.php

    RewriteRule ^(\.env|composer\.(json|lock)|src/|vendor/|sql/) - [F,L,NC]

    RewriteRule ^public(?:/|$) - [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
