# Redirect to login page as default
DirectoryIndex login.php

# Prevent directory listing
Options -Indexes

# Security headers
<IfModule mod_headers.c>
    Header always set X-Content-Type-Options nosniff
    Header always set X-Frame-Options DENY
    Header always set X-XSS-Protection "1; mode=block"
</IfModule>

# PHP settings (adjust as needed)
<IfModule mod_php7.c>
    php_value upload_max_filesize 10M
    php_value post_max_size 10M
    php_value max_execution_time 300
</IfModule>

# URL rewriting (optional - for pretty URLs)
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    # Redirect to login if accessing root
    RewriteRule ^$ login.php [L]
    
    # Protect sensitive files
    RewriteRule ^(config|includes|sql|exports)/ - [F,L]
</IfModule>