4

I have tried using the following code but my website is still compressed using gzip:

SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(html?|txt|css|js|php|pl)$$ no-gzip dont-vary

How can I disable gzip compressions?

rikket
  • 2,357
  • 7
  • 46
  • 74
  • If you're naming the file ".httpaccess" instead of ".htaccess", that might be your problem right there. – Sneftel May 19 '14 at 19:43
  • @Sneftel renamed file but still website is using gzip compression – rikket May 19 '14 at 19:46
  • possible duplicate of [How to disable mod\_deflate in apache2?](http://stackoverflow.com/questions/1922934/how-to-disable-mod-deflate-in-apache2) – Protomen May 19 '14 at 19:51
  • @guilhermeNascimento I tried that solution but it is not working for me, I have simple html files... – rikket May 19 '14 at 21:13
  • "html files" or "odp files"? Clear "cache" in your browser – Protomen May 19 '14 at 22:00
  • @guilhermeNascimento html files like index.html, about.html etc. I am sure it is not "cache" because I am using an external tool to verify – rikket May 19 '14 at 22:04
  • your problem is with "ODP files" or "HTML files"? Post fully "htaccess" – Protomen May 19 '14 at 22:05
  • @guilhermeNascimento I dont have any odp files in my website. Updating questions – rikket May 19 '14 at 22:07
  • @guilhermeNascimento If you know what I'm doing wrong, please post answer and I will glady accept it! I am trying to remove gzip compressions from my website which is made up to of html files – rikket May 19 '14 at 22:20
  • Use ``, It is also likely that there are more setting up for your .htaccess file that you have not posted, or other .htaccess file out of this folder (one level up). Check all this. – Protomen May 19 '14 at 22:43

1 Answers1

6

Put this code in the htaccess file and save it.It worked for me.Disabled gzip compression.

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

Thanks

Sumith Harshan
  • 6,325
  • 2
  • 36
  • 35
  • Where will be insert this above coding in htaccess file, Can you write a full structure of this one.I wrote RewriteEngine on RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1] .... this is right . it is not working for me / please can you help me – mkssathya Jul 25 '17 at 11:04
  • put inside this: – Sumith Harshan Jul 26 '17 at 09:52