Priceless Tips

Fixing Pligg gzip technique errorSubscribe Subscribe

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.

Related posts:


  1. How to restore mysql and create backup without phpMyAdmin
    How to backup your Mysql database with phpMyAdmin Written by Jon Berg Introduction It is very important to do backup of your MySql database, you will probably realize it when...

  2. Make WordPress Blog Load Faster
    Recently I was stumbled into a post about making your Wordpress blog load faster. The principle of this process is simple which is reducing server request as much as possible...

  3. Fixing the Error on gmmktime() expects parameter
    Recently when I installed Magpie RSS on PHP 5.1 it keep showing Error warning: Warning: gmmktime() expects parameter 3 to be long. When I tried finding the answer from Google,...

  4. Free Backlink From High Page Rank Sites
    Some of you probably have heard about Social Bookmarking and it’s advantages to increase visitors number for your blog. In a vibrant social bookmarking community such as digg or technorati,...





Leave a Comment

Required
Required (Won't be published)
Optional
Avatar
Add your picture!
Join Gravatar and upload your avatar. It's free!