Posts Tagged Apache

Enable Apache Mode Rewrite in ubuntu

Posted on September 18, 2009 with No Comments

You need to run “a2enmod rewrite” to enable apache mod_rewrite.

hon@hon-desktop:~/web$ sudo a2enmod rewrite
Module rewrite already enabled
hon@hon-desktop:~/web$

In my case it was already enabled, still .htaccess was not working.

It was the default site, so i need to edit

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

Find

<Directory /var/www/html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
</Directory>

In that find

AllowOverride None

Replace with

AllowOverride All

Now restart apache

/etc/init.d/apache2 restart