If Only I Knew That!

Webby things that could save you time

Archive for September, 2009

Setting up Codeigniter with dynamic configuration variables – fit for development teams

with one comment

When working in a team it is necessary to create dynamic configuration variables for Codeigniter so you can easily share code on development, staging and live servers.

For example, in the team, each developer connects to a common development server (called “localhost”). There is a password protected remote staging server so clients can access it in parallel to the live site (eg. http://client.domain.com). The live site also has a public domain (eg. www.domain.com).  So we need 3 sets of “base_url” and “database” settings.

Click to continue reading “Setting up Codeigniter with dynamic configuration variables – fit for development teams”

Written by ronny

September 29th, 2009 at 4:25 pm

Posted in Codeigniter

Tagged with ,

Reduce Bandwidth with mod_deflate and .htaccess

with one comment

There is something called mod_deflate for Apache 2.x that helps to do auto compression. This is particularly helpful in reducing bandwidth of those nasty jquery plugins.

Step 1:

Add this to the config file (eg. httpd.conf) and then reload Apache

LoadModule deflate_module modules/mod_deflate.so

Step 2:

Then add this to the .htaccess file (to automatically compress javascript, css, html and xml):

<Module mod_deflate.c>
AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

Written by ronny

September 29th, 2009 at 4:24 pm

Posted in Apache

Tagged with ,

Powered by CDN Rewrites