How to Install mod_rewrite
Friday, July 29, 2011 EDT
by: Eric Potvin
Tags:apachemod_rewrite
First, let's find where the mod_rewrite is located:
locate mod_rewrite.so
That will display the full path of where is located the file mod_rewrite.so
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/mod_rewrite.so
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
<Directory>
Options FollowSymLinks
AllowOverride None All
</Directory>
Final step, restart apache:
sudo /etc/init.d/apache2 restart
Now, you will have to start your head ache with mod_rewrite in your .htaccess file.
Link to this Article
To link directly to this article from your web site, use one of the following snippets below.
How to Install mod_rewrite | Book Of Zeus<a href="http://www.bookofzeus.com/articles/how-to-install-mod-rewrite/" title="How to Install mod_rewrite">How to Install mod_rewrite | Book Of Zeus</a>
Short URL:
How to Install mod_rewrite | Book Of Zeus<a href="http://s.bookofzeus.com/krImZ" title="How to Install mod_rewrite Short URL">How to Install mod_rewrite | Book Of Zeus</a>