# Module Uploads Directory - DLL Files Only
# Maximum security for module files

# Block all except DLL files
<FilesMatch "\.dll$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

# Block everything else
<FilesMatch ".*">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Absolutely no PHP execution
<IfModule mod_php7.c>
    php_flag engine off
</IfModule>

# Block PHP files explicitly
<FilesMatch "\.php">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Force download for DLL files
<IfModule mod_headers.c>
    <FilesMatch "\.dll$">
        Header set Content-Type "application/octet-stream"
        Header set Content-Disposition "attachment"
        Header set X-Content-Type-Options "nosniff"
    </FilesMatch>
</IfModule>

# No directory listing
Options -Indexes -ExecCGI

# Security headers
<IfModule mod_headers.c>
    Header set X-Robots-Tag "noindex, nofollow"
    Header set X-Frame-Options "DENY"
</IfModule>

# Block hidden files
<FilesMatch "^\.">
    Order Allow,Deny
    Deny from all
</FilesMatch>
