http://www.iblue.cc/2011/09/ubuntu-apache%E5%BC%80%E5%90%AF%E9%87%8D%E5%86%99%E6%A8%A1%E5%9D%97/
The rewrite module in Ubuntu under Apache2 is not loaded by default.
Just run this command: A2enmod rewrite can enable the rewrite module.
Or:
sudo ln-s/etc/apache2/mods-available/rewrite.load/etc/apache2/mods-enabled/rewrite.load
APACEH2 has more than one set of a2enmod, a2dismod directives for enabling and disabling Apache modules. A2enmod is used to enable the specified module in Apache, and it actually does this by creating a symbolic link to the module file in the/etc/apache2/mods-enabled directory. Conversely, the ability to disable a specified module is achieved by removing the symbolic link (a2dismo). Of course, enabling an enabled module or disabling a disabled module will not be an error. ^^
Here it is necessary to explain:
/etc/apache2/mods-available to put Apache available module files
/etc/apache2/mods-enabled a link to an Apache-enabled module file
Figure out, go to check the/etc/apache2/mods-enabled directory, and indeed there is a new rewrite.load link.
Ubuntu Apache Open Rewrite module