refer to : http://www.seangw.com/wordpress/2012/01/how-to-enable-mod_rewrite-in-apache2-ubuntu/
Apache 2 on Ubuntu is a bit different than some servers, as Apache is usually controlled in the /etc/apache2 directory.
ln -s ../mods-available/rewrite.load rewrite.load
in /etc/apache2/sites-available folder edit the configuration of the site,
change “AllowOverride none“ to “AllowOverride all“