Simplifies Plesk/shared-hosting deployment (no need to set a separate document root subfolder). config.php, includes/ and sql/ are now protected via .htaccess rules instead of living outside the webroot. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
543 B
ApacheConf
21 lines
543 B
ApacheConf
Options -Indexes
|
|
DirectoryIndex index.php index.html
|
|
|
|
<IfModule mod_headers.c>
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set X-Frame-Options "SAMEORIGIN"
|
|
</IfModule>
|
|
|
|
# Sensible Dateien/Ordner dürfen niemals ausgeliefert werden,
|
|
# auch wenn sie hier im Webroot liegen.
|
|
<FilesMatch "^config(\.example)?\.php$">
|
|
<IfModule mod_authz_core.c>
|
|
Require all denied
|
|
</IfModule>
|
|
<IfModule !mod_authz_core.c>
|
|
Deny from all
|
|
</IfModule>
|
|
</FilesMatch>
|
|
|
|
RewriteEngine On
|
|
RewriteRule ^(includes|sql)/ - [F,L]
|