I have an issue with using php-fpm and mod_rewrite
There are mulitple rewrite rules as follows.
ReWriteRule ^/accounts$ /accounts.php [L]
If I go directly to accounts.php the page loads fine. If I go via the rule is loads the php code.
I believe it is caused because the apache config is looking for .php files to pass to php-fpm
ProxyPassMatch ^/(.*.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/vhosts/example.com/public"
I am unable to find a good solution to allow php files to be detected with search engine friendly rewrite rules.