# Views are rendered by CodeIgniter, never requested directly.
# Theme CSS/JS/images under views/themes/*/assets/ must stay public.

Options -Indexes

# Deny direct PHP access everywhere in this tree
<FilesMatch "\.(php|php[0-9]|phtml|phps|phar|pht|inc|shtml|shtm|tpl)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

# Deny the theme template markup that is not part of the live site
<FilesMatch "\.(html?|htm|xhtml|scss|less|md|markdown|txt|lock|dist|map|sql|bak|old|orig|log|ini|sh|yml|yaml|zip|tar|tgz|gz|7z|rar)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

# Note: theme CSS/JS/images under views/themes/*/assets/ are not matched by the
# rules above, so they continue to be served normally.

<IfModule mod_mime.c>
    RemoveHandler .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht
    RemoveType .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht
    AddType text/plain .php .php3 .php4 .php5 .php7 .php8 .phtml .phps .pht
</IfModule>
