# VPN Panel root .htaccess for Apache / LiteSpeed
<IfModule mod_rewrite.c>
    RewriteEngine On

    # Block sensitive file extensions directly
    RewriteRule \.(sql|md|log|json|lock|key|sample)$ - [F,L]
    RewriteRule (^|/)\. - [F,L]

    # Allow direct access to existing files and assets
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_URI} /assets/ [NC]
    RewriteRule ^ - [L]

    # Route all other traffic to index.php
    RewriteRule ^ index.php [QSA,L]
</IfModule>

# Disable directory browsing
Options -Indexes
