# Disable php handlers (mod_php / CGI)
RemoveHandler php php4 php5 php51 php52 php53 php54 rb py pl cgi phps phtml shtml html inc

# Deny executable extensions (also works with PHP-FPM, where RemoveHandler may not work)
# Also covers double extensions such as x.php.png
<IfModule mod_authz_core.c>
    <FilesMatch "(?i)\.(php[0-9]?|phtml|pht|phps|phar|cgi|pl|py|sh|shtml)(\.|$)">
        Require all denied
    </FilesMatch>
</IfModule>
<IfModule !mod_authz_core.c>
    <FilesMatch "(?i)\.(php[0-9]?|phtml|pht|phps|phar|cgi|pl|py|sh|shtml)(\.|$)">
        Order allow,deny
        Deny from all
    </FilesMatch>
</IfModule>
