# ----------------------------------------------------------------------
# Uploaded files are DATA ONLY - never run them as code.
# (Added during the CodeIgniter 4.7.4 security upgrade)
# ----------------------------------------------------------------------
Options -Indexes -ExecCGI

# Do not hand script files to PHP / CGI
<IfModule mime_module>
	RemoveHandler .php .php3 .php4 .php5 .php7 .php8 .phtml .phar .pht .phps .cgi .pl .py .sh .shtml
	RemoveType .php .php3 .php4 .php5 .php7 .php8 .phtml .phar .pht .phps
</IfModule>
<IfModule mod_php.c>
	php_flag engine off
</IfModule>
<IfModule mod_php7.c>
	php_flag engine off
</IfModule>

# Refuse to serve script-like files at all (also blocks HTML/SVG that could carry XSS)
<FilesMatch "(?i)\.(php\d?|phtml|phar|pht|phps|cgi|pl|py|sh|asp|aspx|jsp|shtml|html?|svg|js|htaccess)$">
	<IfModule authz_core_module>
		Require all denied
	</IfModule>
	<IfModule !authz_core_module>
		Deny from all
	</IfModule>
</FilesMatch>

<IfModule mod_headers.c>
	Header always set X-Content-Type-Options "nosniff"
</IfModule>
