[CentOS] Can't get .htaccess to work

Kai Schaetzl maillists at conactive.com
Sat Apr 19 16:31:18 UTC 2008


Jim Perrin wrote on Sat, 19 Apr 2008 10:16:54 -0400:

> <Directory "/change/this">

Jim, you forget that he's using .htaccess, the above cannot work there. He 
has to leave that out.

Pam: if you can access the directory just fine this does *not* mean that 
you misconfigured your .htaccess file (although it looked like that as 
well), it means it is not getting used at all. An .htaccess file that is 
not allowed by server config or that contains wrong configuration throws a 
500 Internal Server Error. You have also been told a while back I think 
that you should look in the logs. Did you do that? I don't remember having 
seen any response from you about that.
Do the following: place a single fake command like "this is a fake 
command" in your .htaccess file and then access the directory. If you 
don't get a 500 error, the file is not getting used. Which means next step 
is to check your logs and your configuration why it's not getting used and 
also double-check that it's in the correct directory and you access the 
correct directory (as I don't know what content you have there this 
content may either be identifying it uniquely or not).

You should also read the Apache documentation at httpd.apache.org, it may 
help you find that probably tiny mistake that you make, but we can't tell 
you as we don't see all of the picture. You should also read up on how you 
can achieve the password protection without an .htaccess file. This file 
is completely unnecessary if you have access to the apache conf, anyway.


Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com






More information about the CentOS mailing list