I'm using a CentOS Linux server with Apache 2 web-server and PHP. I've created .htaccess file for URL rewrting and other configuration options. However, my Apache version 2 .htaccess configuration is not working at all. How do I fix this problem?
Make sure AccessFileName set to .htaccess
Search httpd.conf for AccessFileName directive. It defines name of the distributed configuration file:
Make sure users are allowed to use .htaccess file
What you can put in these files is determined by the AllowOverride directive. This directive specifies, in categories, what directives will be honored if they are found in a .htaccess file. If this directive is set to None, then .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.