Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How to enable compression in WAMP running on Windows Server 2008?

I searched the net and I followed these steps given here: http://www.zigpress.com/2009/04/09/enabling-gzip-on-wamp/.

But after restarting my WAMP the icon got yellow not green.

Than followed this post: http://forum.wampserver.com/read.php?2,93406.

Again the same problem my WAMP icon after restarting gets yellow.

This is the code I put in Apache httpd.conf:

<ifmodule mod_deflate.c>
 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript   application/x-javascript application/javascript
</ifmodule>
share|improve this question
    
Did you try to use .htaccess instead of httpd.conf? –  Zistoloen Oct 22 '13 at 7:29
    
If you have any example please share it –  Mehdi Jalal Oct 22 '13 at 8:05
add comment

2 Answers 2

up vote 2 down vote accepted

To enable Deflate compression for resources with WAMP (thus Apache), you can use this following code in your .htaccess file:

<IfModule mod_deflate.c>
<FilesMatch "\.(html|php|txt|xml|js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

It works well for several websites I own.

share|improve this answer
    
Thanks very much it worked for me –  Mehdi Jalal Oct 22 '13 at 10:03
    
You're welcome. –  Zistoloen Oct 22 '13 at 10:47
add comment

For use, AddOutputFilterByType should also activate the filter module. Uncomment LoadModule filter_module modules/mod_filter.so in the httpd.conf file

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.