# ========================================================
# HAKSA Puantaj ve Bordro Takip Sistemi - cPanel Apache Ayarları
# ========================================================
<IfModule mod_rewrite.c>
  RewriteEngine On
  
  # Gerçekten var olan dosyaları doğrudan sun (js, css, png vb.)
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule ^ - [L]
  
  # API isteklerini api/index.php dosyasına yönlendir (route parametresiyle)
  RewriteRule ^api/(.*)$ api/index.php?route=$1 [QSA,L]
  RewriteRule ^api/?$ api/index.php?route= [QSA,L]
  
  # Diğer tüm istekleri React SPA index.html dosyasına yönlendir
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^ index.html [L]
</IfModule>
