I have a site hosted on Godaddy, I need to enable gzip compression on my website as it recommended on speed test, and I have added below content to .htaccess
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
My final htaccess look like
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
But when I load my website and open the .htaccess file again the file content becomes as reset to initial, like,
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
My godaddy hosting plan is Deluxe Classic Hosting Linux.
Edit:
I got it working by stopping all system process on godaddy, then edit again the .htaccess file resolved the issue.
But this was for short time, after few minutes the .htaccss file revert to it's original content.
Can any one give what can be the issue?