Ubuntu Server: How to Enable the mod_rewrite Module in Apache CodeUnit 13 APR 2011

The extremely useful mod_rewrite or rewrite module is not enabled by default on a new Apache web server install. Luckily, this turns out to be pretty simple to rectify.

Using the a2enmod function, simply run:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

The first line will enable the rewrite module (which should already be available) and the next restarts the apache web server to reflect the new module addition.


Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.