# User-uploaded content. Never execute anything in here.
# Defence-in-depth: even if upload validation is bypassed, the file cannot run.

php_flag engine off

<IfModule mod_php.c>
    php_flag engine off
</IfModule>

# Strip any handler that could execute these
RemoveHandler .php .phtml .php3 .php4 .php5 .php7 .php8 .phar .pl .py .cgi .sh
RemoveType .php .phtml .php3 .php4 .php5 .php7 .php8 .phar

# Serve everything here as inert content
<FilesMatch "\.(php|phtml|php3|php4|php5|php7|php8|phar|pl|py|cgi|sh|htaccess)$">
    Require all denied
</FilesMatch>

Options -Indexes -ExecCGI
