# ===== /wallet-ms clean routing (safe) =====
<Files "db.php">
    Require all denied
</Files>
Options -Indexes -MultiViews
RewriteEngine On

# 1) Force HTTPS (enable only if SSL is correctly installed in hosting)
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# 2) Serve existing files/folders directly
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# 3) Canonical: /index.php -> /
RewriteRule ^index\.php$ / [R=301,L]

# 4) Base URL -> index.php (internal rewrite, no redirect)
RewriteRule ^$ index.php [L]
