.htaccess ErrorDocument 401 problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > .htaccess ErrorDocument 401 problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    .htaccess ErrorDocument 401 problem  
DJ Craig


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-21-05 01:49 AM

I have this .htaccess file:

ErrorDocument 401 /historyerror.htm
AuthUserFile /fubar/htpasswd
AuthGroupFile /dev/null
AuthName "AP/IB US History"
AuthType Basic
require valid-user

It does everything that it's supposed to except redirecting to the
ErrorDocument if you click Cancel when the browser prompts you for the
password.  I've tried specifying the ErrorDocument as an absolute URL,
and as a url from the root of the server like this:
ErrorDocument 401 /www/htdocs/skatecityfamilyskating/historyerror.htm

This is the error I get in IE:

This server could not verify that you are authorized to access the
document requested. Either you supplied the wrong credentials (e.g.,
bad password), or your browser doesn't understand how to supply the
credentials required.
Additionally, a 401 Authorization Required error was encountered while
trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at skatecitykingsport.com Port 80

I've tried googling for htaccess tutorials but none of them explained
this.  Why doesn't it work?






[ Post a follow-up to this message ]



    Re: .htaccess ErrorDocument 401 problem  
HansH


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-21-05 07:51 AM

"DJ Craig" <yomamaDJ1@gmail.com> schreef in bericht
news:1127264518.746030.39830@g44g2000cwa.googlegroups.com...
> I have this .htaccess file:
>
> ErrorDocument 401 /historyerror.htm
> AuthUserFile /fubar/htpasswd
> AuthGroupFile /dev/null
> AuthName "AP/IB US History"
> AuthType Basic
> require valid-user
>
> It does everything that it's supposed to except redirecting to the
> ErrorDocument if you click Cancel when the browser prompts you for the
> password.

> Additionally, a 401 Authorization Required error was encountered while
> trying to use an ErrorDocument to handle the request.
> Apache/1.3.33 Server at skatecitykingsport.com Port 80
>
Looks like your historyerror.htm is in the same folder as your .htaccess,
thus authorization is required for this file too.
Try wrapping your lines between these two
<FilesMatch "!\/historyerror\.htm">
</FilesMatch>
... not sure if negating the match works here.


HansH







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:37 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register