.htaccess files are ignored and do not work

Refers to:

  • Plesk for Linux

Created:

2016-11-16 13:14:33 UTC

Modified:

2017-02-22 04:36:10 UTC

1

Was this article helpful?


Have more questions?

Submit a request

.htaccess files are ignored and do not work

Symptoms

The rules defined in .htaccess files are ignored.

Cause

.htaccess files support is not enabled.

Resolution

To enable .htaccess files support, create *.conf file in /etc/httpd/conf.d/ with the following content:

AccessFileName .htaccess

<Directory "/var/www/vhosts">
Options +All
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Then, restart Apache:

# service httpd restart

Please note that in Debian and Ubuntu the service is named "apache2" instead of "httpd" and the path is /etc/apache2/conf.d/ , instead of /etc/httpd/conf.d/ .

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Gerasimos Perentidis

    The fix does not work.

    Also the article is vague.

    **** create *.conf file in /etc/httpd/conf.d/ ****

    What is   "  *.conf  "   ???

    What is the correct name for the file ?

  • 0
    Avatar
    Vitaly Zhidkov

    @Gerasimos, you can give any name to this file. For example "enablehtaccess.conf"

Please sign in to leave a comment.