A simple .htaccess file might look something like:


AuthUserFile /www/docroot/global/www.yourdomain.com/srccode/.htpasswd
AuthGroupFile /www/docroot/global/www.yourdomain.com/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 /www/docroot/global/www.yourdomain.com/srccode/.htgroup), to view the web pages in the srccode directory, provided they enter the correct password (defined in /www/docroot/global/www.yourdomain.com/srccode/.htpasswd).