Example .htaccess Files

From TSSwiki

Jump to: navigation, search

Below are some examples of the proper formats for .htaccess files. If you need assistance implementing an .htaccess file, please contact the Center for Teaching and Learning.


.htaccess File for Individual User Authentication

#.htaccess file for Any LDAP user Authentication
AuthName "Title of Authentication Box"
AuthBasicProvider ldap
AuthType basic
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://ds.mc.maricopa.edu/dc=mc,dc=maricopa,dc=edu"
Require valid-user

.htaccess File for Group Authentication

#.htaccess file for Group LDAP Authentication
AuthName "Title of Authentication Box"
AuthBasicProvider ldap
AuthType basic
AuthLDAPURL ldap://ds.mc.maricopa.edu/dc=mc,dc=maricopa,dc=edu
AuthLDAPGroupAttributeIsDN on
AuthLDAPGroupAttribute uniquemember
Require ldap-group cn=grp-groupname,ou=Groups, dc=mc,dc=maricopa ,dc=edu