HostOnNet Blog

Enable Apache Mode Rewrite in ubuntu

Looking for Linux Server Admin or WordPress Expert? We can help.

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


        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all

In that find

AllowOverride None

Replace with

AllowOverride All

Now restart apache

/etc/init.d/apache2 restart

Posted in Apache

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.