[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Custom 401/403 Documents using .htaccess
- Subject: [cobalt-users] Custom 401/403 Documents using .htaccess
- From: "Andy Jacobs" <andy@xxxxxxxxxxxxxx>
- Date: Tue Mar 12 07:50:58 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
I might be teaching many grannies to suck eggs here but I have just got this
working and this is what I have found:
You have to edit access.conf so that AllowOverride has FileInfo in and there
are 2 places that this appears. If you don't do this then you get the
Internal Server Errors.
So, my .htaccess file looks like this:
AuthName Protected-Directory
AuthType Basic
AuthUserFile /home/sites/site2/web/clients/.htpasswd
<limit GET POST>
require valid-user
</limit>
ErrorDocument 401 /noauth.htm
ErrorDocument 404 /noauth.htm
Also, I saw that someone said that they got it to work but that the username
dialogue box kept coming back after they had got to their custom page. I
too got this problem. The only way that I could cure this was to remove any
links to files outside the protected directory, even though my noauth.htm
file is in the root for the site. So I embedded my style sheet and made the
page as simple as I could with no images and lo and behold it now works. If
anyone want to have a look then click on the "Clients" link on the URL in my
sig.
I had to take info from loads of archive messages to get to this stage and I
even worked out the external files bit all on my own...my mum would be so
proud!
Anyway, I hope this gives a definitive answer. Any feedback on this may
help me and others in the future.
I'm so happy. After all the help I've got from this group I might just have
given something back!
Andy Jacobs
Media Marks
Web Design, Hosting, Site Promotion
Tel: 023 9241 3880
www.mediamarks.net