homepage Welcome to WebmasterWorld Guest from 54.81.170.136
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

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:4292117
 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:4292780
 11:50 pm on Apr 5, 2011 (gmt 0)

Does anyone have any input on this?

Christian

SEOtop10




msg:4292999
 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:4293219
 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




msg:4293239
 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:4293258
 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




msg:4293260
 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:4293906
 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:4295400
 2:34 pm on Apr 11, 2011 (gmt 0)

Hi,

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


Christian

SEOtop10




msg:4295935
 3:16 am on Apr 12, 2011 (gmt 0)

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

jdMorgan




msg:4297670
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved