Hello,
Voici un fichier .htacces modifier et qui fonctionne parfaitement sur un VPS L et PS 1.6.9
<IfModule mod_expires.c>
# Turn on Expires and set default to now
ExpiresActive On
ExpiresDefault "now"
# Set up caching on media files for 1 month
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|swf)$">
ExpiresDefault "access plus 1 month"
</FilesMatch>
# Set up caching on images, CSS and JS files for 1 week
<FilesMatch "\.(gif|jpg|jpeg|png|js|css)$">
ExpiresDefault "access plus 1 week"
</FilesMatch>
# Set up 1 hour caching on commonly updated files
<FilesMatch "\.(xml|xsl|html|htm|txt)$">
ExpiresDefault "access plus 1 hour"
</FilesMatch>
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl)$">
ExpiresActive Off
</FilesMatch>
</IfModule>
<IfModule mod_headers.c>
# Remote ETag from headers
Header unset ETag
# Disable ETag for files
FileETag None
# Media files are catchable
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|swf)$">
Header append Cache-Control "public"
</FilesMatch>
# Images, css and javascript files are catchable
<FilesMatch "\.(gif|jpg|jpeg|png|js|css)$">
Header append Cache-Control "public"
</FilesMatch>
# Commonly updated files are catchable
<FilesMatch "\.(xml|html|htm|txt)$">
Header append Cache-Control "public"
</FilesMatch>
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl|htm)$">
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript
# Mise en cache
<FilesMatch "\.(js|css|gif|jpg|jpeg|png|ico)$">
Header unset Cookie
Header unset Set-Cookie
Header set Cache-Control "max-age=31536000"
Header set vary "Accept-Encoding"
Header append vary "User-Agent"
Header append Cache-Control "public"
Header append Connection "Keep-Alive"
Header append Keep-Alive "timeout=5, max=100"
FileETag None
</FilesMatch>
#Pour les navigateurs incompatibles
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
#ne pas mettre en cache si ces fichiers le sont déjà
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
#les proxies doivent donner le bon contenu
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
Ne pas oublier de faire une sauvegarde de votre fichier avant toute modification
Bien à vous,