How to allow websites' .htaccess files in Apache2?

How to allow websites to use .htaccess files in Apache2 web servers?

asked Jul 6, 2015 by Eric Z Ma (44,280 points)

1 Answer

Best answer

The AllowOverride directive controls this:

To allow AllowOverride in a directory, add the following rules to the /etc/httpd/conf/httpd.conf or similar configuration file for your apache installation:

    <Directory "/var/www/">
        Options FollowSymLinks
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
        AllowOverride All

        Order allow,deny
        Allow from all

Note that this can be put inside the virtual host configuration block too.

answered Jul 6, 2015 by Eric Z Ma (44,280 points)
selected Jul 6, 2015 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost