Home › Forum › Problemi Vari con WP › problemi con htaccess?
-
AutorePost
-
-
14 Agosto 2012 alle 21:35 #22344apache72Partecipante
Ciao a tutti. Ho un quesito:
Ho controllato con pagespeed la velocità del mio sito http://www.psicologaonlinesalerno.it e il responso è:
Le seguenti risorse memorizzabili nella cache hanno una durata di aggiornamento breve. Specifica una scadenza di almeno una settimana in futuro per le seguenti risorse:
http://psicologaonlinesalerno.it/…/swfobject.js (scadenza non specificata)
http://www.tuttowebmaster.it/imgs/0.277535763875679-50.jpg (scadenza non specificata)
http://www.tuttowebmaster.it/imgs/0.359246991182776-50.jpg (scadenza non specificata)
http://www.tuttowebmaster.it/imgs/0.659171450258331-4.gif (scadenza non specificata)
http://platform.twitter.com/widgets.js?ver=3.4.1 (30 minuti)
https://apis.google.com/js/plusone.js (30 minuti)
http://pagead2.googlesyndication.com/pagead/osd.js (60 minuti)
http://pagead2.googlesyndication.com/pagead/show_ads.js (60 minuti)
http://www.google-analytics.com/ga.js (12 ore)
http://platform.linkedin.com/in.js?ver=3.4.1 (13,7 ore)
ma nel mio htaccess presente nella root ho specificato da un bel po’ di tempo le scadenze cosà¬:
ExpiresActive On
ExpiresDefault “access plus 4 hours”
ExpiresByType application/javascript A18748800
ExpiresByType application/x-javascript A18748800
ExpiresByType text/javascript A18748800
ExpiresByType text/html A604800
ExpiresByType text/xml A604800
ExpiresByType text/css A18748800
ExpiresByType text/plain A604800
ExpiresByType image/gif A29030400
ExpiresByType image/jpg A29030400
ExpiresByType image/jpeg A29030400
ExpiresByType image/png A29030400
ExpiresByType image/bmp A29030400
ExpiresByType application/x-shockwave-flash A18748800
come mai secondo voi non riconosce le date descritte nel htaccess per es. i js, css, jpg,ecc..??
è un problema di wordpress?
-
17 Agosto 2012 alle 10:42 #97116San PietroburgoPartecipante
Ed il modulo? Prova cosà¬:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A3600
ExpiresByType application/x-javascript A3600
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000
</IfModule>
Ovviamente puoi sostituire, modificare, aggiungere o togliere voci; idem per i valori “tempo” espressi nel mio esempio (completo) con altri.
Posiziona tutto prima delle regole di WordPress e non internamente a quelle.
Ovviamente appena sotto alle scadenze dovrai anche definire headers con la sintassi <IfModule mod_headers.c> altrimenti quelle regole saranno incomplete.
Spesso problemi del tipo da te riscontrati sono dovuti al server; prima però bisogna accertarsi che tutto sia stato scritto in maniera corretta nel file .htaccess
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.