Htaccess optimisé pour les Webperf
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Htaccess optimisé pour les Webperf

by
LaurentR8
Created on 2018-02-01 21:28:51 (edited on 2024-09-04 14:19:17) in Hébergements Web

Bonsoir,

Je souhaite optimiser la diffusion d'un site statique généré avec Middleman sur un hébergement Web mutualisé. Deux actions semblent poser problème :

* Le mod_deflate pour la compression des fichiers ;
* Le mod_expires.

Après un passage sur le forum, j'ai beaucoup de mal a identifier la configuration générique proposée par OVH afin d'ajuster au mieux le htaccess. Voici un exemple de test effectué ce jour :


# Deflate
AddOutputFilterByType DEFLATE text/plain text/xml text/css text/javascript application/javascript
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:ico|jpg|jpeg|png|gif)$" no-gzip

# Cache images files for a week(604800 sec)

Header set Cache-Control "max-age=604800, public"


# Cache .css files for a month(2592000 sec)

Header set Cache-Control "max-age=2592000, public"


# Cache .js files for a month(2592000 sec)

Header set Cache-Control "max-age=2592000, private"



Auriez-vous des propositions ?