So I've seen similar issues to this but nothing answers the question with Apache/PHP-FPM
What I'm trying to do: Forward all my requests to index.php without using mod_rewrite.
I'm using the FallbackResource directive inside my vhost.
FallbackResource /index.php
What happens:
mysite.com/anything --> index.php
mysite.com/anything.css --> index.php
mysite.com/anything.html --> index.php
mysite.com/anything.php --> 404 error
mysite.com/anything/anything.php --> index.php
I think the php-fpm is guilty in some way:
# Redirect to local php-fpm if mod_php is not available
<IfModule !mod_php7.c>
<IfModule proxy_fcgi_module>
# Enable http authorization headers
<IfModule setenvif_module>
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
</FilesMatch>
<FilesMatch ".+\.phps$">
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(ar|p|ps|tml)$">
Require all denied
</FilesMatch>
</IfModule>
</IfModule>
because i noticed that it's not just .php files but also all the ones listed here: <FilesMatch ".+\.ph(ar|p|tml)$">