Enabling mod_rewrite in Apache:
$ sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
and restart Apache. This also may need editing /etc/apache2/sites-available/default to AllowOverride all:
<virtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <directory /> Options FollowSymLinks AllowOverride all