University of Louisville -- dare to be great

Skip Navigation

Data Center Services
Home Page

Web Documentation

IT Home

Accounts

Services

Policies

Major Initiatives

News

Units

Contact

Htaccess files on UofL's web servers


.htaccess files are used for a number of reasons in a web directory. They can control customized error messages for that part of the site, special file types being served out of that directory, access control, and a couple other nifty things. The access control is the most common use for them. There is a tutorial for how to do much of the stuff we will be talking about at:

      http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html

It says NCSA httpd and Mosaic, but our server is derived from the NCSA server and supports everything they do. There is also a pretty good list of the directives we will be putting in these files at:

      http://www.apache.org/docs/mod/directives.html

The document covers Run-Time directives for the server, which is what these commands really are. Anything that is said to work in .htaccess will work on UofL's web servers in an .htaccess file.

Sample .htaccess files:
Simple sample using Basic authentication
You can use this type of authentication if you want everyone to use the same userid and password.
Sample using Ulink account authentication
You can use this type of authentication if you want to restrict to a certain list of ULink userids. All you have to maintain is a list of userids. Users can use their normal ULink username and password.  Note: This type of authentication is only available to departmental web sites under www.louisville.edu.

Creating the htpasswd files:
  1. You have to log on to athena and get a command prompt to do this.
  2. cd to the directory in which you wish to keep the htpasswd file.
  3. type htpasswd -c {FILENAME} userid01
  4. You will be prompted twice for the password.

You have now made an htpasswd file. Repeat the procedure to add more users to the file.


Creating an htgroups file:
  1. No real need to log on to athena to do this.
  2. Edit a text file in a text editor.
  3. Each line of the file should contain a groupname and a space separated list of member userids.
  4. FTP the file up to athena and put it where the .htaccess file is going to look for it.

Creating htaccess files on University of Louisville's Intranet site:

For UofL's Intranet (any URL that begins with http://uofl.louisville.edu/) , there are limits already in place. If you want to add to those limits, there is more to be done.

If you want to require a password for every one that visits an Intranet page, then you will need a htaccess file that looks similiar to this.


©2006 University of Louisville. All rights reserved.

U of L Home | U of L A to Z | Contact