Sunday, July 28, 2013

Enable mod_rewrite for apache in Ubuntu

For clean URL we need to use .htaccess and mod rewrite.
In ubuntu we can apply the following command to enable the rewrite modules.

sudo a2enmod rewrite

Change all occurrence of "AllowOverRide None" to "AllowOverRide All".

sudo vi /etc/apache2/sites-available/default

Now restart apache

/etc/init.d/apache2 restart

You are done.

No comments:

Post a Comment