# Deny execution of uploaded files (Apache).
<IfModule mod_authz_core.c>
    Require all granted
</IfModule>

Options -ExecCGI -Indexes -Includes

<IfModule mod_php.c>
    php_flag engine off
</IfModule>
<IfModule mod_php7.c>
    php_flag engine off
</IfModule>
<IfModule mod_php8.c>
    php_flag engine off
</IfModule>

RemoveHandler .php .phtml .php3 .php4 .php5 .php7 .php8 .phar .pl .py .cgi .fcgi .asp .aspx .shtml .jsp
RemoveType .php .phtml .php3 .php4 .php5 .php7 .php8 .phar

<FilesMatch "(?i)\.(php\d*|phtml|pht|phar|phps|cgi|fcgi|pl|py|rb|sh|exe|bat|cmd|com|aspx?|jspx?|htaccess|htpasswd|ini)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
</FilesMatch>
