Jump to content

Trouble enabling Gzip or mod_deflate


Go to solution Solved by Sam46,

Recommended Posts

Hi

 

I am having issue enabling Gzip or mod_deflate on my host server.

 

This is my code for mod_deflate:

<IfModule mod_deflate.c>
#compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/php
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

<IfModule mod_deflate.c>
#Or, compress certain file types by extension:
<files *.php>
SetOutputFilter DEFLATE
</files>
</IfModule>

<IfModule mod_deflate.c>
#compress gif|jpg|jpeg|png:
<Files ~ "\\.(gif|jpg|jpeg|png)$">
SetOutputFilter DEFLATE
</Files>
</IfModule>

as for GZip I used this code:

 

Gzip compression

 

The issue is that when I type my website on here:

 

www.gidnetwork.com/tools/gzip-test.php

 

to test to see how it works it kept saying NO

 

What can I do to make it work or enable? Any suggestions or advice? I just want to see how it compressed the files.

Edited by Sam46
Link to comment
https://forums.phpfreaks.com/topic/279154-trouble-enabling-gzip-or-mod_deflate/
Share on other sites

@requinix

 

Thanks for the reply!

 

 

Can you post your website so we can see it ourselves?

 

I attached an image on how it looks and results:

 

post-157445-0-67411100-1371240533_thumb.png

 

I used photoshop to edit out my link so I added the word demo website.

 

Base on the results what can you see?

 

Did I do something wrong or I missed a code. I mean I can learn from my mistakes.

 

Anything suggestion would be good or directions because I got no idea why it's not showing.

 

Is it because my host server?

  • Solution

I figure out my issue. It was my host server after all

 

I didn't know til now that I need to enable a EasyApache.

 

But the answer I found is here:

 

www.forums.cpanel.net/f5/enable-mod_deflate-c-151541.html

Edited by Sam46
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.