Enable mod_rewrite in Ubuntu 12.04 LTS

Activate the mod_rewrite module with

sudo a2enmod rewrite

and restart the apache

sudo service apache2 restart

To use mod_rewrite from within .htaccess files, edit the default VirtualHost with

sudo vimĀ /etc/apache2/sites-available/default

and change the first two occurrences of

AllowOverride None


AllowOverride All

Save and exit the vimĀ editor

Restart the server again:

sudo service apache2 restart

About The Author

Most Helpful User