Example .htaccess file
#### Restricting access to users based on NYU NetID #### Order deny,allow AuthType Basic AuthName "Authorized NYU users only!" AuthBasicAuthoritative On AuthBasicProvider ldap-nyu require valid-user satisfy all #### Restricting based on CIMS groups #### # To restrict access to users with CIMS accounts that # are in a particular group by # querying the CIMS ldap server # Not available at this time #### Restricting based on .htpasswd file #### # You can password protect a web directory so that only a given # set of users can access it. # You'll need to create a .htpasswd file that is referred # to in your .htaccess file. The .htpasswd should reside outside # your web hierarchy for security reasons. # To create and/or add users to your .htpasswd file use the # /usr/bin/htpasswd command. # # note: set the permissions on .htpasswd as follows # "chmod 604 .htpasswd" # and make sure the permissions on "some-nonweb-dir" are set to 701 # AuthType Basic AuthUserFile /home/username/some-nonweb-dir/.htpasswd AuthName "Members ONLY" require valid-user #### Restricting based on domains #### # You can also restrict access to a web directory based on domains # deny from all allow from .cs.nyu.edu .cims.nyu.edu .net.nyu.edu .med.nyu.edu AuthType Basic AuthName "Members ONLY"