# İZ Okulları · Apache yapılandırması
Options -Indexes
DirectoryIndex index.php
AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Alt dizin kurulumu: sitenin kökü https://webambari.com/izokullari/
  # Başka bir dizine kurarsanız aşağıdaki iki satırdaki /izokullari/ yolunu değiştirin.
  RewriteBase /izokullari/
  # HTTPS'e yönlendir (SSL kurulduktan sonra açık kalmalı)
  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]
  # Kısa adresler: /izokullari/panel, /izokullari/veli, /izokullari/giris
  RewriteRule ^(panel|veli|giris)/$ /izokullari/$1 [R=301,L]
  RewriteRule ^panel/?$ index.php?v=panel [L,QSA]
  RewriteRule ^veli/?$ index.php?v=veli [L,QSA]
  RewriteRule ^giris/?$ giris.php [L,QSA]
  # Uygulama klasörüne doğrudan erişimi engelle
  RewriteRule ^app(/|$) - [F,L]
</IfModule>

<FilesMatch "\.(sql|md|log|lock|json\.gz|bak)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
</FilesMatch>

<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|jpg|png|webp|woff2)$">
    Header set Cache-Control "public, max-age=2592000"
  </FilesMatch>
</IfModule>

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

AddType application/manifest+json .webmanifest
