Options -Indexes
RewriteEngine On

# Varsa gerçek dosya/klasörü doğrudan sun
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^ index.php [QSA,L]

# Modern görsel türleri
<IfModule mod_mime.c>
    AddType image/avif .avif
    AddType image/webp .webp
    AddType video/mp4 .mp4
    AddType video/webm .webm
    AddType font/woff2 .woff2
</IfModule>

# Uzun süreli önbellek (dosya adları değişmediği sürece)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/avif "access plus 1 year"
    ExpiresByType image/webp "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType video/mp4 "access plus 1 year"
    ExpiresByType video/webm "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>

# mod_php kullanılıyorsa yükleme sınırları (FPM'de .user.ini geçerlidir)
<IfModule mod_php.c>
    php_value upload_max_filesize 110M
    php_value post_max_size 120M
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value max_input_time 300
</IfModule>
