A simple .htaccess file might look something like:


AuthUserFile /users/ugrad/jdoe/public_html/srccode/.htpasswd
AuthGroupFile /users/ugrad/jdoe/public_html/srccode/.htgroup
AuthName srccode
AuthType Basic 

<Limit GET>
require user jsmith jdoe
require group students
</Limit> 

This would allow the users jsmith and jdoe, as well as all the users defined in group students (defined in /users/ugrad/jdoe/public_html/srccode/.htgroup), to view the web pages in the srccode directory, provided they enter the correct password (defined in /users/ugrad/jdoe/public_html/srccode/.htpasswd).