Apache Windows httpd.conf AccessFileName problem
I am using Apache 2.2.17 for Windows. To set up .htaccess
file, when I was going through httpd.conf
file, I was not able to find the word called “AccessFileName”
. I believe there should be a line like this: AccessFileName .htaccess
. How c开发者_如何学编程an I solve this?
Here is the httpd.conf
file.
The AccessFileName .htaccess
is default. If it is not present, that is what it's using. If you would to like use a different filename, you can add the line in and replace .htaccess
accordingly.
I solved it by changing AllowOverride None
to AllowOverride All
inside <Directory>
As you can read here
It says:
While processing a request the server looks for the first existing configuration file from this list of names in every directory of the path to the document, if distributed configuration files are enabled for that directory. For example:
AccessFileName .acl
before returning the document /usr/local/web/index.html, the server will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl for directives, unless they have been disabled with
<Directory> AllowOverride None </Directory>
精彩评论