2026-11-13 00:35:39 +01:00
|
|
|
|
# Drink it cold – Apache-Konfiguration für die Subdomain.
|
|
|
|
|
|
# Öffentlich ist nur dieses Verzeichnis; app/, views/, sql/ und storage/
|
|
|
|
|
|
# liegen zwar im selben FTP-Baum, sind aber zusätzlich per .htaccess gesperrt.
|
|
|
|
|
|
|
|
|
|
|
|
Options -Indexes
|
2026-11-29 16:31:28 +01:00
|
|
|
|
# Die öffentliche Startseite ist statisch (index.html, Kunden-Marketing);
|
|
|
|
|
|
# die App liegt unter /login bzw. /dashboard und wird von index.php bedient.
|
|
|
|
|
|
DirectoryIndex index.html index.php
|
2026-11-13 00:35:39 +01:00
|
|
|
|
AddDefaultCharset UTF-8
|
|
|
|
|
|
|
2026-11-13 00:46:02 +01:00
|
|
|
|
<IfModule mod_mime.c>
|
|
|
|
|
|
AddType application/manifest+json .webmanifest
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
2026-11-13 00:35:39 +01:00
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
|
|
|
|
# Immer HTTPS. Der Hoster kann TLS terminieren, daher auch der Proxy-Header.
|
|
|
|
|
|
RewriteCond %{HTTPS} !=on
|
|
|
|
|
|
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
|
|
|
|
|
|
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
|
|
|
|
|
|
|
|
|
|
|
# Interne Verzeichnisse nie ausliefern.
|
|
|
|
|
|
RewriteRule ^(app|views|sql|storage|tools)(/|$) - [F,L]
|
|
|
|
|
|
RewriteCond %{REQUEST_URI} !^/\.well-known/
|
|
|
|
|
|
RewriteRule (^|/)\. - [F,L]
|
|
|
|
|
|
|
|
|
|
|
|
# Nicht vorhandene Pfade an den Front Controller.
|
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
|
|
RewriteRule ^ index.php [QSA,L]
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
|
|
|
|
<IfModule mod_headers.c>
|
|
|
|
|
|
Header always set X-Content-Type-Options "nosniff"
|
|
|
|
|
|
Header always set X-Frame-Options "DENY"
|
|
|
|
|
|
Header always set Referrer-Policy "same-origin"
|
|
|
|
|
|
<FilesMatch "\.(css|js|svg|png|jpg|jpeg|webp|ico|woff2)$">
|
|
|
|
|
|
Header set Cache-Control "public, max-age=604800"
|
|
|
|
|
|
</FilesMatch>
|
2026-11-29 18:22:44 +01:00
|
|
|
|
<FilesMatch "\.html$">
|
|
|
|
|
|
Header set Cache-Control "no-cache"
|
|
|
|
|
|
</FilesMatch>
|
2026-11-13 00:46:02 +01:00
|
|
|
|
<FilesMatch "^sw\.js$">
|
|
|
|
|
|
Header set Cache-Control "no-cache, no-store, must-revalidate"
|
|
|
|
|
|
Header set Service-Worker-Allowed "/"
|
|
|
|
|
|
</FilesMatch>
|
|
|
|
|
|
<FilesMatch "^(manifest\.webmanifest|offline\.html)$">
|
|
|
|
|
|
Header set Cache-Control "public, max-age=3600"
|
|
|
|
|
|
</FilesMatch>
|
2026-11-13 00:35:39 +01:00
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
|
|
|
|
<FilesMatch "^(\.env|\.git.*|composer\..*)$">
|
|
|
|
|
|
<IfModule mod_authz_core.c>
|
|
|
|
|
|
Require all denied
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
</FilesMatch>
|
|
|
|
|
|
|
|
|
|
|
|
<IfModule mod_php.c>
|
|
|
|
|
|
php_flag display_errors off
|
|
|
|
|
|
php_flag log_errors on
|
|
|
|
|
|
</IfModule>
|