I have been working intensely with Apache2 for a few days and learning the ins and outs of Apache2.

Mod Rewrite is an Apache module used to modify urls in most CMSs like Wordpress.

Configuration for Apache2 can be found at /etc/apache2/. In Apache2, if you need to enable modules you need to copy files from /etc/apache2/mods-available/ to /etc/apache2/mods-enabled/.

Enable Mod Rewrite

Now we are ready to enable Mod Rewrite. Type the following commands:

cd /etc/apache2/
cp mods-available/rewrite.load mods-enabled/rewrite.load

The above would copy the module to the mods-enabled folder. Another option would be to create a symbolic links.

cd /etc/apache2/
ln -s mods-available/rewrite.load mods-enabled/rewrite.load

Restart Apache

All changes would not take effect until we restart Apache2.

service apache2 restart

Mod Rewrite Enabled!


In Debian based systems, modules can be enabled and disabled at will using utilities provided by Debian’s Apache distribution. In our case, if you are using Debian, you can use the following command to load the Rewrite Module.

a2enmod rewrite

Good luck!