by default apache will load php interpreter with .php extension. Somep\how php interpreter also called with this kind of extension .php.fr . How to disable this language extension?
Hi,
you can setup the extensions interpreted by Apache on 2 Places.
httpd.conf
AddType application/x-httpd-php .phpx
Will load .phpx files as PHP Scripts
mime.type
application/x-httpd-php phpx
The .fr
is being interpreted as French during content negotiation by Apache. This is probably because you have Options +MultiViews
and MultiviewsMatch Handlers
are both set. Getting rid of either should stop .php.fr
from working, but changing this may break other pages. (Assumably, you enabled both for a reason). Also, I'm not completely sure if MultiVideosMatch
applies to PHP, but Options +MultiViews
definitely does.
If you're trying to make sure people can't upload PHP files and have your webserver execute them, instead of just blacklisting extensions, use php_admin_flag engine off
to turn off PHP in that location:
<Location /uploads>
php_admin_flag engine off
</Location>