Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-filehttps://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for the whole website.

Keep in mind that you are telling PHP not to gzip, but Apache may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for the whole website.

Keep in mind that you are telling PHP not to gzip, but Apache may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]

Check here: https://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for the whole website.

Keep in mind that you are telling PHP not to gzip, but Apache may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
Updated answer after comment from w3d. Added example from linked thread.
Source Link
Clarkey
  • 241
  • 1
  • 4

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for every site hosted on your serverthe whole website.

EDIT: Just re-read your question. Your code will tellKeep in mind that you are telling PHP to not to gzip, but is Apache configured to gzip too?may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for every site hosted on your server.

EDIT: Just re-read your question. Your code will tell PHP to not gzip, but is Apache configured to gzip too?

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for the whole website.

Keep in mind that you are telling PHP not to gzip, but Apache may still be gzipping so this should sort it, but check Apache config.

RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
Source Link
Clarkey
  • 241
  • 1
  • 4

Check here: http://stackoverflow.com/questions/9249243/how-to-disable-apache-gzip-compression-for-some-media-files-in-htaccess-file

It's possible, but looks like it will disable gzip for every site hosted on your server.

EDIT: Just re-read your question. Your code will tell PHP to not gzip, but is Apache configured to gzip too?