Apache2 enable .htaccess

To make .htaccess files work as expected, you need to edit this file:


Look for a section that looks like this:

                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/

You need to modify the line containing AllowOverride None to read AllowOverride All. This tells Apache that it’s okay to allow .htaccess files to over-ride previous directives. You must reload Apache before this change will have an effect:

    sudo /etc/init.d/apache2 reload

Make sure Apache .htaccess is enabled (by default it is enabled in Ubuntu)

    sudo a2enmod rewrite

Cheers 🙂

1 Comment

  1. php news script

    you have got a great blog right here! would you like to make some invite posts on my weblog?


Leave a Comment

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