Apache2 does not have mod_rewrite turned on by default. Fortunately there are just a few steps to get this functionality working.
First activate rewrite engine using the following command.
a2enmod rewrite
Then allow override in the site configuration file on Apache. In my case I am testing it on a development machine, so I will edit the main file
sudo gedit /etc/apache2/sites-enabled/default.
by changing AllowOverride from None to All.
<Directory /mnt/Personal/Web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
At the end Restart apache2.
sudo /etc/init.d/apache2 restart