Options -Indexes
DirectoryIndex index.php

# Rewrite rules for clean URLs (optional)
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # Block access to sensitive files
    RewriteRule ^\.env - [F,L]
    RewriteRule ^\.install\.lock - [F,L]
</IfModule>

# PHP settings for free hosting
<IfModule mod_php.c>
    php_value upload_max_filesize 100M
    php_value post_max_size 105M
    php_value max_execution_time 300
    php_value memory_limit 256M
</IfModule>

# Security headers
<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>

# Protect upload folder
<FilesMatch "\.(php|php3|php4|php5|phtml)$">
    Order Deny,Allow
    Deny from all
</FilesMatch>
