Two things.
1) For ubuntu, you need to make sure mod_rewrite is enabled. Run this from a shell. sudo a2enmod rewrite
2) Make sure overrides are allowed in the apache webserver. How to do that will depend on version of apache thats installed.
In older versions of Apache all virtual host directory directives were managed in the /etc/apache2/apache2.conf file. This has changed. Now these alterations are handled within the /etc/apache2/sites-enabled/ directory. Within that directory you will find, by default, a single file called 000-default. If you open that file up for editing you will see, at the top, the two sections you need to edit in order to enable the rewrite engine for the document root of your Apache server.
First look in the <Directory /> section and change the line:
AllowOverride None
to
AllowOverride All
Do the same for the <Directory /var/www/> section.
Once you have the file edited, restart Apache with the command:
sudo /etc/init.d/apache2 restart
Google search for ubuntu htaccess will turn up a lot of information on setting up a ubuntu webserver.
I am a CentOS person myself. I grew up with redhat. I cannot stand Ubuntu.