Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Allow access to files
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ - [L]
    
    # Deny access to directories
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [F]
</IfModule>

# Security headers
<IfModule mod_headers.c>
    # Allow access to image and PDF files
    <FilesMatch "\.(jpg|jpeg|png|gif|pdf|webp)$">
        Header set Content-Type "image/*; application/pdf"
    </FilesMatch>
</IfModule>

