ich habe im zuge der Pagespeed Optimierung per htaccess den Cache aktiviert, nun habe ich allerdings das Problem, dass scheinbar sämtliche Analytics Dienste eindeutig zu wenig Benutzer erkennen.
Ich habe zu dem das Problem, wenn ich mich einloggen möchte, dass ich erstmal F5 drücken muss, damit der Cache umgangen wird.
Folgendes ist in meiner htaccess enthalten, evtl. kennt sich hier jemand aus und kann mir sagen, was ich falsch gemacht habe.
Code: Alles auswählen
AddDefaultCharset utf-8
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,QSA,L]
RewriteRule ^index\.(html?|php)$ http://%{HTTP_HOST}/ [R=301,QSA,L]
ErrorDocument 403 /fehlerseiten/403.php
ErrorDocument 401 /fehlerseiten/401.php
ErrorDocument 500 /fehlerseiten/500.php
ErrorDocument 404 /fehlerseiten/404.php
<IfModule mod_headers.c>
Header append Vary Accept-Encoding
</IfModule>
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|php|xml|gif|jpe?g|png|ico)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# Expire headers 1209600 Sekunden = 2 Wochen
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1209600 seconds"
ExpiresByType application/javascript A1209600
ExpiresByType application/x-javascript A1209600
ExpiresByType text/javascript A1209600
ExpiresByType text/html A1209600
ExpiresByType text/xml A1209600
ExpiresByType text/css A1209600
ExpiresByType text/plain A1209600
ExpiresByType image/gif A1209600
ExpiresByType image/jpg A1209600
ExpiresByType image/jpeg A1209600
ExpiresByType image/png A1209600
ExpiresByType image/bmp A1209600
ExpiresByType application/x-shockwave-flash A1209600
</IfModule>
# BEGIN Cache-Control Headers
<ifmodule mod_headers.c>
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=1209600, public"
</filesmatch>
<filesmatch "\\.(css)$">
Header set Cache-Control "max-age=1209600, private"
</filesmatch>
<filesmatch "\\.(js)$">
Header set Cache-Control "max-age=1209600, private"
</filesmatch>
<FilesMatch "\\.(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</FilesMatch>
</ifmodule>
# Turn ETags Off
<ifmodule mod_headers.c>
Header unset ETag
</ifmodule>
FileETag None
Danke für euere Mühe und Hilfe.
VG
Sisslik