Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .htaccess file that isn't working. I know it's not working because i wrote random things in it and i am not getting a 500 error. Even when i write proper code it doesn't work. I have verified that is in my root directory and has the proper file name. Here is the directory "tag" from http.conf:

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all

I used <?php phpinfo(); ?> and verified that mod_rewrite is enabled, but still no luck.

share|improve this question
Anything useful in the Apache error log? – Shane Madden Jan 20 '12 at 2:36
@ShaneMadden how do i do that. im not getting any error when i run my htaccess in my directory. the pages load like normal – user176105 Jan 20 '12 at 2:38
Open the Apache error log and look for any errors that are relevant. The log's location is variable based on how it was installed and what system you're on. – Shane Madden Jan 20 '12 at 2:40
@ShaneMadden it seems that ive gotten about a hundred errors and all of them are the same thing. "[Thu Jan 19 21:50:56 2012] [error] [client] File does not exist: /Library/WebServer/Documents/favicon.ico" – user176105 Jan 20 '12 at 2:57

I wonder if that Deny from all might be the problem. If Apache knows it's going to send a 403 response, it might not even bother reading the .htaccess file.

Other potential problems could include a typo in the name of the .htaccess file (although you did say you'd checked this), a different AccessFileName value to normal and file/directory permissions on any of the directories leading up to your DocumentRoot.

It might be worth using strace to verify that Apache is actually reading your .htaccess file. Make sure Apache is stopped then start it this way:

sudo strace -f -e open apache2 -X

Then make your request again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.