.htaccess authorization requiring username/password for every resource
Posted
by webworm
on Server Fault
See other posts from Server Fault
or by webworm
Published on 2010-03-30T15:10:01Z
Indexed on
2010/03/30
15:13 UTC
Read the original article
Hit count: 451
I am using Apache2 on Ubuntu and I have having some "weird" user authorization issues. I am using .htaccess to control access to my directories. I have many users and have grouped them into user groups which are defined in a "group" file. I then use .htaccess within each directory to define which users have access to the directory and which do not. Here is an example .htaccess file.
AuthUserFile /var/local/.htpasswd
AuthGroupFile /var/local/groups
AuthName "Username and Password Required"
AuthType Basic
require group design admin
Everything is working with one exception. I added a new user to one of my groups and though they can gain access to the directory they are prompted for a username and password for every resource (i.e. image, CSS). After a while I can just keep selecting "cancel" and I will get a page with just html with no images or CSS. I would think the browser would just cache the username/password. It seems to be working well for other users. Any thoughts?
© Server Fault or respective owner