# ============================================================
#  public_html/dashboard/.htaccess
# ============================================================

# ── Sem listagem de diretório ────────────────────────────────
Options -Indexes

# ── URLs limpas (sem .php) ───────────────────────────────────
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]+)/?$ $1.php [L]

# ── Redireciona /dashboard/ para /dashboard/index ────────────
RewriteRule ^$ index.php [L]

# ── Bloqueia acesso direto a arquivos internos ───────────────
<FilesMatch "^(_layout|_layout_end|auth)\.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
