-
-
Save sdeluce/8525084 to your computer and use it in GitHub Desktop.
htaccess gzip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## activation ZEND optimizer | |
SetEnv ZEND_OPTIMIZER 1 | |
## suppression de SESSID dans les url | |
SetEnv SESSION_USE_TRANS_SID 0 | |
## serveur en PHP5 | |
SetEnv PHP_VER 5_3 | |
## Commenter la ligne ci-dessous si plantage | |
# php_flag zlib.output_compression on | |
## Activer le filtre | |
SetOutputFilter DEFLATE | |
## Certains navigateurs ne peuvent pas avoir GZIP (les vieux) | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0678 no-gzip | |
## On ne prend pas IE | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
## On ne compresse pas les images, elles le sont déjà | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary | |
## on gère le cas des proxy | |
Header append Vary User-Agent env=!dont-vary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment