如何在apache中阻止不需要的php请求

Our web application needs no php code and our apache has no php installed,
but there are annoying php requests from different unwanted sources all the time.

How can I configure apache to ignore them, that those requests don't spoil the apache error log.

As we have unrestricted access to the server, we do not need an htaccess file.

Thanks alot in advance

You can try this in your httpd.conf in your section where mod_rewrite is mentioned

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule \.php.* - [F,L]
</IfModule>

Aside from the previous answer to forbid all php requests, you can also not log them with:

SetEnvIf Request_URI "\.php.*?" no_log
CustomLog /path/to/vh-access.log common env=!no_log