# ----------------------------------------------------------------------
# | Assets Protection
# ----------------------------------------------------------------------

# Disable script execution in the assets directory
<FilesMatch "\.(php|phtml|php[345]|phar|sh|pl|py|cgi)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order Allow,Deny
        Deny from all
    </IfModule>
</FilesMatch>

# Allow access to images, css, and js
<FilesMatch "\.(jpg|jpeg|png|gif|webp|svg|css|js|woff|woff2|ttf|eot|ico)$">
    <IfModule mod_authz_core.c>
        Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order Deny,Allow
        Allow from all
    </IfModule>
</FilesMatch>
