Hallo zusammen,
ich habe bein einem "Bestprice Classic"-Tarif eine eigene .htaccess im Webroot. Diese funktioniert grundsätzlich auch. Die 404 Fehlerseite wird bspw. aufgerufen. Nur habe ich das Gefühl, dass so einige Parameter nicht genommen werden / nicht aktiviert werden. Bspw. ist HSTS nicht aktiv, obwohl spezifiziert.
Kann jemand über meine .htaccess drüber schauen und sagen, ob ich eine Fehler habe?
Ich habe auch die Vermutung, das nicht alle Parameter im Webhosting-Tarif freigeschaltet sind. Gibt es da eine Auflistung?
# Deflate compression
<IfModule mod_deflate.c>
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
<files *.min.js>
SetOutputFilter DEFLATE
</files>
</IfModule>
# Caching
<IfModule mod_expires.c>
FileETag MTime Size
ExpiresActive On
ExpiresByType text/css "access plus 4 months"
ExpiresByType application/javascript "access plus 4 months"
ExpiresByType application/x-javascript "access plus 4 months"
ExpiresByType text/javascript "access plus 4 months"
ExpiresByType image/gif "access plus 4 months"
ExpiresByType image/jpeg "access plus 4 months"
ExpiresByType image/png "access plus 4 months"
ExpiresByType image/x-icon "access plus 4 months"
</IfModule>
# Extra Security Headers
<IfModule mod_headers.c>
Header set Connection keep-alive
Header set X-Content-Type-Options nosniff
Header always edit Set-Cookie (.*) "$1; HttpOnly; Secure"
Header set Referrer-Policy "origin-when-cross-origin"
Header unset Server
Header always unset X-Powered-By
Header unset X-Powered-By
Header unset X-CF-Powered-By
Header unset X-Mod-Pagespeed
Header unset X-Pingback
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
</IfModule>
# Mime types
<IfModule mod_mime.c>
AddType 'text/html; charset=UTF-8' html
AddType 'text/javascript; charset=UTF-8' js
AddType 'text/css; charset=UTF-8' css
AddType 'application/manifest+json; charset=UTF-8' json
AddType application/font-woff2 woff2
AddType application/font-woff woff
AddType image/jpeg jpeg jpg jpe
</IfModule>
# X-UA-Compatible
<FilesMatch "\.(htm|html|php)$">
<IfModule mod_headers.c>
Header set X-UA-Compatible "ie=edge"
</IfModule>
</FilesMatch>
# 404 error page
ErrorDocument 404 /404.html
Alles anzeigen
Das Wiki auf Seite https://www.netcup-wiki.de/wiki/Htaccess ist nicht sehr hilfreich. Über das WCP kann man auch .htaccess Parameter setzen, doch verwirrt mich das mehr als es hilft. Ich weiß bspw. nicht wo was da reinkopiert werden soll.
Gruß