1. #sudo a2enmod rewrite
2. # sudo vim -b /etc/apache2/sites-avalible/000-default

3. Find the following

Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

and change it to

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

4. and finally restart Apache

sudo /etc/init.d/apache2 restart

 

Ref : http://vassie.wordpress.com/2006/06/12/how-to-enable-mod_rewrite-on-dapper/