How-To: .htaccess not working? Maybe Apache is Ignoring It!
- 3
- Add a Comment
I am a web developer. As a web developer, I require a web server to test my applications on. When .htaccess does not work, I am unable to test my applications. See the problem?
So, this problem has plagued me before awhile back, and it happened again today. At first I thought it was a problem with mod_rewrite, but after a long time of scrolling through logs and config files, I found that that wasn’t the problem. The problem is due to the default virtual host config Apache provides you. If you check that file, you will notice one (or possibly more) directive called AllowOverride. What this setting does is allow files like .htaccess to modify the server configuration. By default in the virtual host file, it is set to “None”. This means that Apache will completely ignore .htaccess (or whatever file you have set to AccessFileName). Simply setting it to “All” instead will fix the problem.
While it may not be used by everyone, .htaccess still has an important role, especially if you want to prettify your URLs (WordPress uses .htaccess for this purpose). I don’t know why the Apache team decided to disable .htaccess by default, nor do I really care. I am just glad I found a solution that works.



3 Comments
Rewriting for RESTful URLs in Apache and Nginx » Eddie Ringle
August 25th, 2009
at 10:08pm
[...] To The Release Of WicketPixie v1.0.4WicketPixie Is Even Better Now!How-To: .htaccess not working? Maybe Apache is Ignoring It!How To Use A GitHub Repository With Redmine Using CronA Brief PHP Tutorial: #1 Hello [...]
Christophe
July 17th, 2010
at 8:20pm
Hi My Friend,
Thanks a lot for having shared this information. After having failed to fix this trouble, I was going to leave my computer in the hope to find a solution tomorrow after a restfull night. Fortunately I found your article and fixed the issue in a minute !!
Thanks again
Kyle
September 5th, 2010
at 6:23pm
Amazing, solved the problem. The setting “Allowoverride” is in httpd.conf