Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Everything was working perfectly a few hours ago, but now, when I try to access one protected directory in one of my websites hosted on my dedicated server that runs Cent OS and apache, it just redirectos to the website home page.

What is strange is that I changed nothing before this starting to happen. I even renamed the directory and created another user for it, but the problem continues.

The directory htaccess looks like this:

AuthType Basic
AuthName "something here"
AuthUserFile "/home/sitename/.htpasswds/public_html/directoryname/passwd"
require valid-user

The headers are strange. I got this:

Server Response:

HTTP/1.1 302 Found
Date: Tue, 17 May 2011 01:34:03 GMT
Server: Apache
WWW-Authenticate: Basic realm="type your password"
X-Powered-By: PHP/5.3.6
Set-Cookie: cookielang=
Set-Cookie: Poweredlang=pt; expires=Wed, 18-May-2011 02:44:03 GMT
Content-Length: 733
Content-Type: text/html
share|improve this question

Check your .htaccess in main directory, looks like it contains some RewriteRules

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.