🌐 BunnyDNS Manager v1.1 - Custom nameservers, improved zone deletion, DNSSEC view fixes.
🐰 BunnyCDN for WHMCS - Automated provisioning, usage tracking, bandwidth billing. Full CDN integration.
📋 Credit Notes for WHMCS - Professional credit note handling for EU VAT compliance.
⚙️ PowerDNS Manager v1.12 - On-demand DNSSEC checks, instant zone listing, browser caching.
🔐 Access Shield Pro 1.5 - GDPR-compliant IP anonymization, smart permanent ban cleanup, improved security rules.

Disable Directory Browsing with .htaccess Print

  • 0

Stop Apache from showing directory contents when no index file exists.

Disable Directory Browsing

Add to .htaccess:

Options -Indexes

That's it.

What This Prevents

Without this, visiting example.com/uploads/ shows:

Index of /uploads
[ICO] Name            Last modified      Size
[DIR] 2024/           2024-01-15 10:23    -
[IMG] secret.jpg      2024-01-12 09:15   2.1M
[TXT] passwords.txt   2024-01-10 14:22   1.2K

With this, visitors get:

403 Forbidden

Variations

Disable for specific directories:

<Directory /var/www/html/uploads>
    Options -Indexes
</Directory>

Custom error message:

Options -Indexes
ErrorDocument 403 "Access denied"

Hide only certain files:

IndexIgnore *.pdf *.doc *.zip

Enable for Specific Folders

If you need directory listing somewhere:

# In specific folder's .htaccess
Options +Indexes

Check Current Status

curl -I https://example.com/uploads/

Returns 403 = disabled, 200 = enabled


Was this answer helpful?

« Back

WHOIS Information

×
Loading WHOIS information...