# BotGuard — Apache front-controller rewrite + hardening
# (Nginx/LiteSpeed equivalents are documented in docs/DEPLOYMENT.md)

<IfModule mod_rewrite.c>
    RewriteEngine On

    # If the app lives in a sub-directory, set RewriteBase accordingly, e.g.:
    # RewriteBase /botguard/public/

    # Serve existing files and directories directly.
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Route everything else through the front controller.
    RewriteRule ^ index.php [L]
</IfModule>

# Do not expose dotfiles (.env lives outside public, but be defensive).
<FilesMatch "^\.">
    Require all denied
</FilesMatch>

# Disable directory listing.
Options -Indexes

# Default character set.
AddDefaultCharset UTF-8
