# Enable URL rewriting
RewriteEngine On

# Set the base for rewriting
RewriteBase /new_bot/admin/

# Prevent direct access to PHP files in includes directory
RewriteRule ^includes/ - [F,L]

# Handle 404 errors
ErrorDocument 404 /new_bot/admin/index.php

# Handle 500 errors
ErrorDocument 500 /new_bot/admin/error.php

# Ensure PHP errors are displayed
php_flag display_errors On
php_value error_reporting E_ALL

# Protect against XSS attacks
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
</IfModule>

# Disable directory listing
Options -Indexes