Archive for September, 2009
Setting up Codeigniter with dynamic configuration variables – fit for development teams
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.
Reduce Bandwidth with mod_deflate and .htaccess
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>