Skip to content

ubuntu and .htaccess file

Assalamu Allaikum

It is quite amusing for me to find out that ubuntu’s apache2 does not allow .htaccess override by default

Here is a detailed procedure on how to do this…

Step 1:

First, open the following file using gedit

gksudo gedit /etc/apache2/sites-available/default

Then Look for the settings

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

Change the

AllowOverride None


AllowOverride All

Now save and close this file

Step 2:

You can skip this step if you do not require the rewrite module

Open the Console and write the following line

sudo a2enmod rewrite

Step 3

Its just restarting the apache2

sudo service apache2 restart

Now Enjoy the usage of .htaccess in ubuntu.


Leave a Reply

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