# ========================================================
# LION CHEATS BOT - SECURITY & REWRITE RULES
# ========================================================

# 1. Directory Listing Band Karein (Taaki koi folder ke andar ki files na dekh sake)
Options -Indexes

# 2. Sensitive Files ko Block Karein
<FilesMatch "\.(sql|log|txt|md|json|env)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# 3. Config aur Functions Files ko Direct Access se Rokhein
<FilesMatch "^(config|functions|webhook)\.php$">
    Order allow,deny
    Deny from all
</FilesMatch>

# 4. .htaccess aur .git folder ko Block Karein
<Files ~ "^\.(htaccess|htpasswd|git)">
    Order allow,deny
    Deny from all
</Files>

# 5. PHP Error Display Off Karein (Production ke liye)
php_flag display_errors off
php_value error_reporting 0

# 6. Uploads folder me sirf images/videos allow karein, PHP execution band karein
<Directory "uploads">
    <FilesMatch "\.(php|php3|php4|php5|phtml|pl|py|jsp|asp|htm|shtml|sh|cgi)$">
        Order allow,deny
        Deny from all
    </FilesMatch>
</Directory>

# 7. Gzip Compression (Website Fast Load Hogi)
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
</IfModule>

# 8. Browser Caching (Images aur CSS bar bar load nahi hongi)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
</IfModule>

# 9. Custom Error Pages (Optional)
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php

# ========================================================
# END OF FILE
# ========================================================