# Uploaded files are data, never code.
# php_flag only works under mod_php; on CGI/FPM/LiteSpeed it would cause a 500, so it is guarded.
<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 .phar .php5 .php7 .php8
<FilesMatch "\.(php|phtml|phar|php5|php7|php8|pl|py|cgi|sh)$">
  Require all denied
</FilesMatch>
<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
</IfModule>
Options -Indexes -ExecCGI
