Commands (Ubuntu)
sudo a2enmod rewrite
sudo service apache2 restart
vi etc/apache2/apache2.conf
change AllowOverride None to AllowOverride All (see below)
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
sudo service apache2 restart