How to Save Bandwidth with .htaccess

posted: Monday 23 November 2009 by Tavis J. Hampton in: Web Hosting Web servers

Coins in child's hands

Question: My dynamic PHP-driven site is popular and is using a lot of bandwidth. What can I do to save that precious bandwidth?

Answer: Those of you who have to worry about bandwidth should really consider yourselves lucky. It means that your website has been more successful than the majority of others on the Web. Still, I sympathize a little with you, because bandwidth does cost money, and any sensible person will try to save money whenever possible.

With the combination of Apache and PHP, there is an easy way to cut your bandwidth usage nearly in half, and it’s very easy to do. I have not had a chance to test this, but according to corz.org, it only takes one .htaccess directive:

< ifmodule mod_php4.c>
php_value zlib.output_compression 16386
< /ifmodule>

Save that in an .htaccess file, and you are good to go. There are some limitations, particularly if your PHP installation is less than normal. You can read about them on the aforementioned site. Happy savings!

Photo Source: Flickr

1 stelle2 stelle3 stelle4 stelle5 stelle (no votes)
share this 0 comments

Related posts

Server Hardware Tips del 28 Jul 2010
Server Maintenance Tips del 28 Jul 2010
Server Hosting Tips del 27 Jul 2010
Server Domain Tips del 27 Jul 2010

Related tags

Be the first to add a comment to this article.

Your email address is required but won't be displayed.
Leave a comment

Register to reserve your nickname accross all the blogs in the Blogo network and to upload your avatar. If you already are registered, login to user your nickname.

Yes No

Comment preview

Network Blogo