I have been working intensely with Apache2 for a few days and learning the ins and outs of Apache2.
Configuration for Apache2 can be found at
/etc/apache2/. In Apache2, if you need to enable modules you need to copy files from
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
cd /etc/apache2/ ln -s mods-available/rewrite.load mods-enabled/rewrite.load
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.