<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule \.(?:php[0-9]*|phtml|phar)(?:/|$) - [F,NC]
</IfModule>

<IfModule mod_authz_core.c>
    <FilesMatch "(?i)\.(php[0-9]*|phtml|phar)$">
        Require all denied
    </FilesMatch>
</IfModule>

<IfModule mod_access_compat.c>
    <FilesMatch "(?i)\.(php[0-9]*|phtml|phar)$">
        Order allow,deny
        Deny from all
    </FilesMatch>
</IfModule>