🎟️ Coupon Client для WHMCS - Автоматическое применение купонов для конкретных клиентов при оформлении заказа.
🔐 MFA Reminder v1.3 - Поддержка нескольких пользователей, индивидуальная проверка MFA для суб-пользователей.
🛡️ Access Shield Pro v1.4 - Упрощённая настройка сканеров/honeypot с поддержкой wildcards и regex
🤖 AI Support Assistant 2.1 - Поддержка GPT-5 и Claude Opus 4.1, авто-подписи, улучшенная обработка ошибок.

Disable Directory Browsing with .htaccess Печать

  • 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


Помог ли вам данный ответ?

« Назад

WHOIS Information

×
Loading WHOIS information...