Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.

htaccess Cache Einstellung blockt Analytics

Alles zum Thema Website- und Conversion Tracking sowie Tipps & Kniffe zu Google Analytics, Etracker, Omniture, Webalizer, AWstats und anderen statistischen Hilfsmitteln.
Neues Thema Antworten
sisslik
PostRank 1
PostRank 1
Beiträge: 6
Registriert: 05.02.2012, 08:26

Beitrag von sisslik » 05.02.2012, 08:36

Servus,

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 "\.&#40;js|css|html|php|xml|gif|jpe?g|png|ico&#41;$"> 
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 "\\.&#40;ico|jpe?g|png|gif|swf&#41;$">
        Header set Cache-Control "max-age=1209600, public"
  </filesmatch>
  <filesmatch "\\.&#40;css&#41;$">
        Header set Cache-Control "max-age=1209600, private"
  </filesmatch>
  <filesmatch "\\.&#40;js&#41;$">
        Header set Cache-Control "max-age=1209600, private"
  </filesmatch>
  <FilesMatch "\\.&#40;x?html?|php&#41;$">
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
Ich gehe davon aus das ich die PHP und javascripte nicht mehr Cache darf, bzw. Dort einen kleineren Wert eintragen muss...

Danke für euere Mühe und Hilfe.

VG
Sisslik

Antworten
  • Vergleichbare Themen
    Antworten
    Zugriffe
    Letzter Beitrag