homepage Welcome to WebmasterWorld Guest from 54.145.252.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Compressing Using Mod Deflate?
mod_deflate, compression, apache
TeamSDA



 
Msg#: 4292115 posted 12:42 am on Apr 5, 2011 (gmt 0)

Hi,

I am trying to get compression to work on my Apache server. So far I have only gotten mod_deflate to work using my .htaccess file. My hosting provider told my that I can't use mod_gzip. How can I use the code below to compress .php documents as well?


<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>



If anyone has any other suggestions for compression that would be great.


Christian

 

TeamSDA



 
Msg#: 4292115 posted 11:50 pm on Apr 5, 2011 (gmt 0)

Does anyone have any input on this?

Christian

SEOtop10

10+ Year Member



 
Msg#: 4292115 posted 9:09 am on Apr 6, 2011 (gmt 0)

Generally .php outputs as text/html, so .php files will be compressed by this anyway.

You can use a server header tool to check the headers sent by the server when you request your php file and you can see what content type is returned. Include that if it is not covered in the list.

TeamSDA



 
Msg#: 4292115 posted 4:18 pm on Apr 6, 2011 (gmt 0)

Hi SEOtop10,

Using www.gidnetwork.com I tested the page and the content type came up as text/html. That content type is already in the code above. Hmmm, why isn't it working?

Christian

SEOtop10

10+ Year Member



 
Msg#: 4292115 posted 4:37 pm on Apr 6, 2011 (gmt 0)

How do you know it is not compressing the file? Have you checked the response headers? Can you paste them here?

TeamSDA



 
Msg#: 4292115 posted 4:53 pm on Apr 6, 2011 (gmt 0)

The test I'm using says it's not. I've include the testing site and url below.


Using: [gidnetwork.com...]

Tested url: (www.sutherlanddesignagency.com/careers.php)

SEOtop10

10+ Year Member



 
Msg#: 4292115 posted 4:57 pm on Apr 6, 2011 (gmt 0)

Can you also paste your .htaccess file? You need to change all references to your domain to example.com.

TeamSDA



 
Msg#: 4292115 posted 10:49 pm on Apr 7, 2011 (gmt 0)

Hi SEOtop10,

Below is my .htaccess file.



ErrorDocument 404 /errorpage.html

RewriteEngine on

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html(\?[^\ ])?\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html$ http://www.example.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>



Christian

TeamSDA



 
Msg#: 4292115 posted 2:34 pm on Apr 11, 2011 (gmt 0)

Hi,

If anyone had any suggestions on this that would be great.


Christian

SEOtop10

10+ Year Member



 
Msg#: 4292115 posted 3:16 am on Apr 12, 2011 (gmt 0)

Looks Ok to me. May be someone else might spot a problem.

jdMorgan

WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4292115 posted 4:53 pm on Apr 14, 2011 (gmt 0)

Concurrent thread continues here [webmasterworld.com].

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved