# GORGOR Outdoor — Apache yapılandırması
Options -Indexes
DirectoryIndex index.php
AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
RewriteEngine On
# HTTPS'e yönlendir (SSL kurulduktan sonra aktif kalabilir)
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTP_HOST} !^(localhost|127\.0\.0\.1)
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Hassas klasörler
RewriteRule ^(data|app|templates)(/|$) - [F,L]
# Yönetim paneli
RewriteRule ^admin/?$ admin/index.php [L,QSA]
# Var olan dosyalar dışında her şey index.php'ye
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L,QSA]
</IfModule>

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set X-Frame-Options "SAMEORIGIN"
<FilesMatch "\.(jpg|jpeg|png|webp|gif|svg|css|js|woff2|mp4)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>

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

<FilesMatch "\.(sqlite|sqlite-wal|sqlite-shm|json|md)$">
Require all denied
</FilesMatch>
