# MARPAR Paneli - Apache güvenlik ayarları
Options -Indexes -MultiViews
ServerSignature Off
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Uygulama kodu, depolama ve gizli dosyalara doğrudan erişimi kapat
  RewriteRule ^(app|storage)(/|$) - [F,L]
  RewriteRule ^install/schema\.sql$ - [F,L]
  RewriteRule (^|/)\. - [F,L]
  RewriteRule \.(sql|md|log|ini|lock|bak|sh|env|json\.bak)$ - [F,L]
</IfModule>

<FilesMatch "\.(sql|md|log|ini|lock|bak|env)$">
  Require all denied
</FilesMatch>

<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "DENY"
  Header always set Referrer-Policy "same-origin"
  Header always unset X-Powered-By
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 7 days"
  ExpiresByType application/javascript "access plus 7 days"
  ExpiresByType font/woff2 "access plus 30 days"
  ExpiresByType image/png "access plus 30 days"
</IfModule>

# Yükleme limitleri (mod_php ile çalışırken; PHP-FPM/FastCGI için .user.ini kullanılır)
<IfModule php_module>
  php_value upload_max_filesize 16M
  php_value post_max_size 64M
  php_value max_file_uploads 20
  php_flag display_errors off
  php_flag session.cookie_httponly on
</IfModule>
