# -------------------------------------------------
# Enable a simple directory listing – useful for
# screen‑reader users and for anyone browsing the
# honeypot files.
Options +Indexes
IndexOptions FancyIndexing HTMLTable=FALSE SuppressHTMLPreamble

# -------------------------------------------------
# Prevent any script execution from this folder.
# Only static files (ASC, TXT, MD, etc.) will be served.
RemoveHandler .php .phtml .cgi .pl .py .asp .aspx .jsp
RemoveType .php .phtml .cgi .pl .py .asp .aspx .jsp

# -------------------------------------------------
# Return a 410 Gone response for any file that has
# already been marked as expired. The cleanup script
# (create_self_destruct.sh) creates an empty placeholder
# with the same name; this rule catches those placeholders.
<IfModule mod_headers.c>
    <FilesMatch "Expires-[0-9]{8}\.asc$">
        Header set Status "410 Gone"
        ErrorDocument 410 "File removed – expired."
    </FilesMatch>
</IfModule>

# -------------------------------------------------
# Optional: block access to hidden files (starting with a dot)
# This keeps .htaccess itself and any backup files private.
<FilesMatch "^\.">
    Require all denied
</FilesMatch>