|
Home > Archive > Apache Server configuration support > September 2005 > .htaccess ErrorDocument 401 problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
.htaccess ErrorDocument 401 problem
|
|
| DJ Craig 2005-09-20, 8:49 pm |
| 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?
| |
|
| "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
|
|
|
|
|