# ====================================== # SICHERHEIT # ====================================== # Schutz der Konfigurationsdatei Order allow,deny Deny from all # Schutz der PHPMailer-Dateien (nur über PHP-Includes erreichbar) Order allow,deny Deny from all # Schutz vor Directory Browsing Options -Indexes # PHP Fehler nicht anzeigen (für Produktivbetrieb) # Hinweis: php_flag funktioniert nur wenn PHP als Apache-Modul läuft # Bei FastCGI/CGI: Verwenden Sie stattdessen .user.ini (siehe unten) # php_flag display_errors Off # php_flag log_errors On # ====================================== # SEO & PERFORMANCE # ====================================== # HTTPS Weiterleitung (aktivieren wenn SSL verfügbar) # RewriteEngine On # RewriteCond %{HTTPS} off # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # www zu non-www Weiterleitung (oder umgekehrt) # RewriteEngine On # RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] # RewriteRule ^(.*)$ https://%1/$1 [R=301,L] # ====================================== # GZIP KOMPRESSION # ====================================== AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json application/xml # ====================================== # BROWSER CACHING # ====================================== ExpiresActive On # Bilder ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" # CSS und JavaScript ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" # Fonts ExpiresByType font/woff "access plus 1 year" ExpiresByType font/woff2 "access plus 1 year" ExpiresByType application/font-woff "access plus 1 year" ExpiresByType application/font-woff2 "access plus 1 year" # HTML ExpiresByType text/html "access plus 1 hour" # Favicon ExpiresByType image/x-icon "access plus 1 year" # ====================================== # MIME TYPES # ====================================== AddType application/javascript js AddType text/css css AddType image/svg+xml svg svgz AddType font/woff woff AddType font/woff2 woff2