Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issues With ErrorDocument Directive

Status
Not open for further replies.

mtorbin

Technical User
Nov 5, 2002
369
US
Hey all,

I'm having some issues with the ErrorDocument directive, specifically for 401 errors and I'm not sure why. All of my other directives work but this one. Here's the details:

1) A user comes to the site and wants to log in.
2) IF that user supplies a faulty password then the user should get a 401.

Simple, right? Well, it's not working. I thought about two things both of which I'm testing right now:

1) The error page should be located in the directory that's being
protected.
2) The directive should specifically point to that file.

I'm not sure that this will fix it. Now, I do have several other ErrorDocument directives up and runnning so that leads me to wonder whether or not there's a memory liimit? Any suggestions?

- MT
 
Your first thought is correct. You cannot expect Apache to let the user access an error page in the protected area.

//Daniel
 
I figured that much. So why is that directive and ONLY that directive not working? I've done this 100 times before, I just can't figure it out!
 
Why should it? You are protecting the directory, hence the user will not be able to get any page from the directory unless they supply valid credentials.
You need to put your error pages in an unprotected area of your site.

//Daniel
 
No, you're missing my point. All of my error_XXX.html files are located in a directory that is NOT protected. This is the only error message that will not work.... can't quite figure it out.

 
What does your
Code:
ErrorDocument
directives look like?
I have never had any problems with 401 error pages, as long as they are not in a protected area.

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top