# Defense-in-depth: this folder holds user-uploaded files. Upload.php already
# forces every saved file to a random name with a fixed, safe extension
# (.jpg/.png/.webp — never .php), so nothing here should ever be executable.
# This file makes that true even if a future change, a misconfigured host,
# or an unrelated bug ever let something else land in this directory.
#
# Covers the two common cPanel/Apache PHP handlers (mod_php and
# suPHP/CGI/FPM-via-handler) since shared hosts vary in which one they use.

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

# suPHP / CGI / FastCGI handler-based PHP
<FilesMatch "\.(php|php3|php4|php5|php7|phtml|pht)$">
    SetHandler none
    RemoveHandler .php .php3 .php4 .php5 .php7 .phtml .pht
    Require all denied
</FilesMatch>

# No directory listings, and CGI execution stays off in this folder
Options -Indexes -ExecCGI
