Files

38 lines
1.3 KiB
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Athena Studios Launcher - Apache front-controller routing
#
# Route every request that does not map to a real file/directory to the
# front controller (index.php). DocumentRoot must point at this directory
# (WebBackend/public).
#
# NOT: deploy-apache.sh / apache.conf.sample kurulumlarında her şey vhost
# içinde tanımlıdır (AllowOverride None) ve bu dosya OKUNMAZ. Bu .htaccess
# yalnızca paylaşımlı hosting gibi vhost'a erişemediğiniz ortamlar içindir.
<IfModule mod_rewrite.c>
RewriteEngine On
# KRİTİK: Bearer JWT (Authorization başlığı) PHP'ye geçsin. Apache/PHP-FPM
# bu başlığı varsayılan olarak düşürür; launcher'ın korumalı uçları (JWT)
# aksi halde 401 döner.
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%1]
# Serve existing files and directories directly.
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Everything else -> front controller.
RewriteRule ^ index.php [L]
</IfModule>
# Do not allow directory listings.
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# Defans-derinliği: backend iç dizinleri public içine taşınsa bile servis edilmesin.
<IfModule mod_alias.c>
RedirectMatch 404 "(?i)^/(data|seed|src|cli)(/|$)"
</IfModule>