← Kapat

.htaccess

# Güvenlik Ayarları
Options -Indexes

# JSON ve Lock dosyalarına direkt erişimi engelle
<FilesMatch "\.(json|lock)$">
    Require all denied
</FilesMatch>

# Admin config dosyasını güvene al (eğer yanlışlıkla public klasöre atılırsa)
<Files "admin_config.php">
    Require all denied
</Files>

# HTTPS Yönlendirme
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# URL Rewriting (Temiz Linkler)
# Klasör veya dosya varsa direkt eriş
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^hizmet/([^/]+)/?$ service-details.php?service=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^proje/([^/]+)/?$ portfolio-details.php?slug=$1 [L,QSA]

# Sayfa yönlendirmeleri (uzantısız erişim için opsiyonel)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]+)/?$ $1.php [L,QSA]