By Sam Ilan · Tip and Guides · Monday, May 5, 2008 20:55 · 0 Comments

Fixing Pligg gzip technique error

I am proud to announce the launch of the new social bookmarking sites ShowUs. ShowUs is a social bookmasking site, where you can share and votes any interesting information collected around the web. You can promotes any interesting information from your blog as well. Currently ShowUs accommodates 8 news categories where you can place any related news and information. Just show to us what you find and we will votes for your news.

Since I’d like to push the site performance to the higher level, several tweak has been applied. The Gzip Technique were supposed to boost the site loading but unfortunately it didn’t work out of box. The standard instruction to activate the gzip technique gives the 500 error on ShowUs server. So far the problem was on PHP commands (php_value auto_prepend_file …) that can’t go in an .htaccess file.

Eventually I have to use another way to activate gzip feature on my server. The workaround is to create a php.ini in your site root, and add the following 2 lines:

auto_prepend_file=/home/path/public_html/begin_gzip.php
auto_append_file=/home/path/public_html/end_gzip.php

Then I add the following code on .htaccess file

<files *.js.gz>
AddType “text/javascript” .gz
AddEncoding gzip .gz
</files>
<files *.css.gz>
AddType “text/css” .gz
AddEncoding gzip .gz
</files>
RewriteEngine on
#Check to see if browser can accept gzip files.
ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
#make sure there’s no trailing .gz on the url
ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f
#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [QSA,L]

Now my ShowUs Social Bookmarking is gzipped and its loading time decreased significantly. Hopefully the high performance would attract more user and visitors. If you wanna join as the member so register yourself today and start showing us all you’ve got.

Don't forget to Subscribe!
 

Previous Posts

Advertisements

Google Hacks! Computer / Internet Book Soft Cover
US $3.00 (0 Bid)
End Date: Wednesday May-14-2008 15:11:16 PDT
Bid now | Add to watch list

Computer Book-The Internet for Dummies Quick Reference
US $2.49 (0 Bid)
End Date: Saturday May-17-2008 22:11:53 PDT
Bid now | Add to watch list

Perl for Dummies by Paul Hoffman Book Computer Internet
US $0.99 (0 Bid)
End Date: Sunday May-18-2008 12:53:02 PDT
Bid now | Add to watch list

This entry was posted by Sam Ilan on Monday, May 5th, 2008 at 8:55 pm and is filed under Tip and Guides.

Taged as: , ,

You can leave a response, or trackback from your own site.

0 responses so far!

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

Incoming search terms for this post