# Protect sensitive files and secure cache directory
Options -Indexes

<FilesMatch "^(bot_error\.log|config\.php|database\.sql)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Allow Telegram Webhook JSON payloads
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^bot$ bot.php [L,QSA]
</IfModule>