Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule (^|/)\. - [F,L]
    RewriteCond %{REQUEST_URI} !\.(?:jpe?g|png|gif|webp|ico)$ [NC]
    RewriteRule ^ - [F,L]
</IfModule>

<FilesMatch "\.(?:php[0-9]?|phtml|phar|phps|cgi|pl|asp|aspx|shtml?|html?|xhtml|svg|xml|js|css|sh|ini|log|bak)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

RemoveHandler .php .phtml .phar .cgi .pl
RemoveType .php .phtml .phar .cgi .pl
<IfModule mod_php.c>
    php_flag engine off
</IfModule>
