OVH Community, votre nouvel espace communautaire.

Expires header ne fonctionne pas


mathieu14
26/07/2016, 18h58
merci

buddy
26/07/2016, 18h38
Citation Envoyé par mathieu14
Bonjour,

j'ai le code suivant dans mon .htaccess et il ne fonctionne pas.GTmetrix indique "Add expires header"

Code:
# Requires mod_expires to be enabled.

  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  
Tu en as un qui marche ici https://www.how-to.ovh/viewtopic.php?t=71

mathieu14
26/07/2016, 16h35
Bonjour,

j'ai le code suivant dans mon .htaccess et il ne fonctionne pas.GTmetrix indique "Add expires header"

Code:
# Requires mod_expires to be enabled.

  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off