# HexaHost.de .htaccess # Sicherheit und Performance-Optimierungen # Sicherheitsheader Header always set X-Content-Type-Options nosniff Header always set X-Frame-Options DENY Header always set X-XSS-Protection "1; mode=block" Header always set Referrer-Policy "strict-origin-when-cross-origin" Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()" # HTTPS erzwingen (falls SSL verfügbar) RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(www\.)?hexahost\.de$ [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # HTML zu PHP Weiterleitungen RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)\.html$ $1.php [L,R=301] # Direkte HTML zu PHP Weiterleitungen für bekannte Seiten RewriteRule ^index\.html$ index.php [L,R=301] RewriteRule ^about\.html$ about.php [L,R=301] RewriteRule ^contact\.html$ contact.php [L,R=301] RewriteRule ^vpc\.html$ vpc.php [L,R=301] RewriteRule ^vps\.html$ vps.php [L,R=301] RewriteRule ^webhosting\.html$ webhosting.php [L,R=301] RewriteRule ^mail-gateway\.html$ mail-gateway.php [L,R=301] # Konfigurationsdateien schützen Order allow,deny Deny from all Order allow,deny Deny from all Order allow,deny Deny from all # Logs-Verzeichnis schützen Order allow,deny Deny from all # Vendor-Verzeichnis schützen Order allow,deny Deny from all # Cache-Header für statische Dateien ExpiresActive On ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/svg+xml "access plus 1 month" ExpiresByType image/webp "access plus 1 month" ExpiresByType font/woff "access plus 1 month" ExpiresByType font/woff2 "access plus 1 month" # Gzip-Kompression AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript # PHP-Einstellungen php_value upload_max_filesize 10M php_value post_max_size 10M php_value max_execution_time 30 php_value memory_limit 128M # Fehlerbehandlung ErrorDocument 404 /404.html ErrorDocument 500 /500.html # Verzeichnis-Listing deaktivieren Options -Indexes # Datei-Zugriff beschränken Order Allow,Deny Deny from all