I noticed the other discussions about mod_deflate vs css_gzip.
I would like to use the caching of css_gzip, but still would like to use mod_deflate for other content.
So, is there any way I can tell mod_deflate to not gzip css.gz and js.gz files (because they are already gzipped)?
Or, is there any way that Apache could gzip and cache my css files?
Ideally with a .htaccess setting.
I am also a bit confused by the
"Certain hosts do not like multiple .htaccess files. To get around this issue ..."
statement.
The statement suggests that css_gzip attempts to create a new .htaccess file somewhere. If it does so, I would like to know more about that!
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#6 | css_gzip-713880.patch | 760 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedIt creates a .htaccess file in the sites/default/files/css directory. It uses the same technique as Javascript Aggregator; that creates one in the sites/default/files/js directory. So in these generated .htaccess files you could then turn off apache's mod_deflate and be ready to go.
Comment #2
donquixote CreditAttribution: donquixote commentedNice, but how would this modified .htaccess look like?
Sorry, my htaccess fu is not the best (and maybe other readers will feel the same).
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedwhat does your mod_deflate rules look like?
Comment #4
donquixote CreditAttribution: donquixote commentedLooking into /etc/apache2/mods-enabled/deflate.conf.
I'm talking about two different servers, which host totally different sites.
Server I:
Server II:
Auto-generated .htaccess file in sites/default/files/css (Server II):
deflate.load (Server I and II)
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedLooking to the apache documentation there isn't any explanation on how to "turn off" deflate for certain directories/.htaccess-files, but you can try this.
http://httpd.apache.org/docs/trunk/mod/mod_deflate.html
http://httpd.apache.org/docs/trunk/mod/mod_setenvif.html
Place this at the top of the Auto-generated .htaccess file
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedTrick from http://drupal.org/node/101227#comment-3176382
Comment #7
pwaterz CreditAttribution: pwaterz commentedcheck out his tutorial from how to forge http://www.howtoforge.com/apache2_mod_deflate
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedCSS Gzip will no longer be updated/supported. All future development is being done in the Advanced CSS/JS Aggregation module.