Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For some reason none of my .htaccess files are loading. What are the common things that make this happen? I can use in httpd.conf, and create it there, but it doesn't read .htaccess files in my directories.

share|improve this question
    
Is that Apache server you are using? –  FractalizeR May 17 '10 at 7:28
add comment

3 Answers

Ensure your httpd.conf has this line

AccessFileName .htaccess

If it does, are you on a Windows system? If so, you can't create but can update a file without a filename (i.e. .htaccess, .bat etc) - when running Windows, I rename my .htaccess to htaccess and update httpd.conf to read

AccessFileName htaccess

If you are getting an internal server error, check your apache logs as defined in the ErrorLog directive i.e.:

ErrorLog "logs/error.log"

and post that error here for further debugging.

share|improve this answer
    
How come you cannot update a file like ".htaccess" on Windows? I always can. –  FractalizeR May 17 '10 at 7:28
    
My mistake, Windows won't allow .htaccess creation, but will allow updating. –  Andy May 17 '10 at 8:20
add comment

You need to use AllowOverride to have Apache allow .htaccess directives.

share|improve this answer
    
when I do that I get an internal server error –  matt May 16 '10 at 18:05
    
You will find the reason for the "Internal Server Error" in your error.log. –  joschi May 17 '10 at 6:14
add comment

If you have lighttpd you CAN NOT use htaccess. You can put your htaccess settings only into lighttpd config file.

share|improve this answer
add comment

Your Answer

 
discard

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.