# uploads/.htaccess — protect uploaded files from being executed as PHP
# This file lives INSIDE the uploads/ folder, so these rules only apply there.

# Disable PHP execution in this directory
php_flag engine off

# Deny direct access to any PHP/script files
<FilesMatch "\.(php|php3|php4|php5|php7|phtml|pl|py|cgi|sh)$">
  Require all denied
</FilesMatch>

# Force download (attachment) for common upload types so they don't render inline
<IfModule mod_headers.c>
  <FilesMatch "\.(jpg|jpeg|png|gif|webp)$">
    Header set Content-Disposition "inline"
  </FilesMatch>
</IfModule>

# Prevent Apache from interpreting uploaded .htaccess files
<Files ".htaccess">
  Require all denied
</Files>
