rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

How to Install mod_rewrite

First, let's find where the mod_rewrite is located:


That will display the full path of where is located the file

Then, create a new file for mod_rewrite:

sudo vi /etc/apache2/mods-enabled/rewrite.load

And add the following line:

LoadModule rewrite_module /path/to/

Then edit /etc/apache2/sites-available/default (if that file is not found edit /etc/apache2/sites-available/000-default) and change the AllowOverride from None to All in the following configuration:

DocumentRoot /var/www
	Options FollowSymLinks
	AllowOverride None All

Final step, restart apache:

sudo /etc/init.d/apache2 restart

Now, you will have to start your headache with mod_rewrite in your .htaccess file.