[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] .htaccess yet again
- Subject: Re: [cobalt-users] .htaccess yet again
- From: Gerald Waugh <gwaugh@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed Feb 13 12:24:46 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Wed, 13 Feb 2002, Edward Bishop wrote:
> This might well be in the archive, but I can't find it; it's one of
> those that gives too many irrelevant hits when searching. I've looked
> in the RaQFaQ and the wider web as well. Also it might not be
> Cobalt-specific so apologies in advance.
>
> Can .htaccess be used to require authorisation for access a directory
> and then redirect the browser to a custom page if that authorisation
> fails - ie if the user fails three times to supply a valid l/p?
>
> Here's my .htaccess which should make it clear what I'm trying to do:
>
> AuthPAM_Enabled off
> AuthUserFile /home/sites/home/web/protected-directory/.htpasswd
> AuthGroupFile /dev/null
> AuthName "Authorised users only"
> AuthType Basic
> <Limit GET PUT POST>
> require valid-user
> </Limit>
> ErrorDocument 403 http://www.mydomain.com/youfailed.htm
> ErrorDocument 401 http://www.mydomain.com/youfailed.htm
>
401 is correct!
#ErrorDocument 401 /cobalt_error/authorizationRequired.html
--
Gerald Waugh