multiple .htaccess files
I have an .htaccess file in my root directory which performs some automatic redirects and has my custom error pages. I want to add a second .htaccess file in a sub-directory to require a log/passwd protection. When i put this second .htaccess file in the sub-directory, instead of getting the log/passwd box up when i try to access a page within that sub-directory i just get an error. I know the code in my htaccess file is correct as when i delete the .htaccess file in my root, the log/passwd works perfectly. The first htaccess has no code in it to do with authorisation and therefore i dont understand why it is blocking the log/pass in the sub-directory. Is there some sort of command i need to place in the first file to allow the second one to be read correctly ? any ideas ? thanks
OtterBob posted this at 13:54 — 23rd July 2004.
He has: 46 posts
Joined: Jun 2004
I'm going to go with the most likely problem and say that in your main .htaccess file you've defined a 401 document. So when the server sees that your subdomain needs authentication it pulls up the 401 document before the login screen even enters the picture. Delete the 401 entry and you'll be all set.
NO I'M NOT THAT SMART! If you're the same person, you posted the solution on another forum. Nice catch though. And now I understand what 401 is for.
"In theory, there's no difference between theory and practice. In practice, there is." -- Yogi Berra
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.