Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/05/2009, 05:11
juanpons14
 
Fecha de Ingreso: diciembre-2007
Ubicación: Valencia
Mensajes: 113
Antigüedad: 16 años, 5 meses
Puntos: 1
Añadir Expires Headers

Hola que tal,
Tengo una web que es www.universoflash.com el problema es que he estado optimizandola dos semanas calentandome la cabeza juntando todos los archivos js y css coomprimirlos desactivar los etags..etc...todo lo que me decia YSLOW.

Solo hay algunas cosas que me faltan y que suspendo con un tremendo F!

Añadir Expires Headers.

He buscado en ask apache y e ntodos los sitios pero todos los codigos que encuentro para el .htaccess no me valen me tiran 500 internal server error estoy utilizando Wordpres 2.7 y no tengo ningun plugin de cache ni nada!

Gracias!!

Mi actual .htaccess:

Código:
# INICIO Directivas para fecha de expiracion  
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A86400
ExpiresByType image/x-icon A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A2592000
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType text/plain A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
ExpiresByType text/html A900
</IfModule>
# FIN Directivas para fecha de expiracion

# INICIO cache
<ifmodule mod_headers.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</FilesMatch>
 
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
</ifmodule> 
# FIN cache 
   
#INICIO deshabilitar el famoso ETag  
<ifmodule mod_headers.c="">  
Header unset ETag  
</ifmodule>  
FileETag None 
# FIN deshabilitar el famoso ETag  

# INICIO Compresion GZip
RewriteEngine on
RewriteOptions Inherit

#Check to see if browser can accept gzip files.
ReWriteCond %{HTTP:accept-encoding} (gzip.*)

#make sure there's no trailing .gz on the url
#ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$

#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f

#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [L] 
# FIN Compresion GZip

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# INICIO bye bye spam
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*universoflash.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
# FIN bye bye spam
Se supone que la primera parte me tendria que añadir expiracion en los archivos pero YSlow sigue diciendo que no lo hace y creo que no lo hace XD....asique que esta mal??

Algunos conesjos para cofigurar mi .htaccess??

Gracias!