Eastern Michigan University EMU HOME
About people.emich.edu
Tips & Resources
Print this page

Enabling Protection

To enable password protection, you will need to create a text-only file called .htaccess (notice the dot at the beginning of the filename) and upload it to the directory you want to protect.

  • AuthUserFile /data/personal/htdocs/username/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Authorization Required"
    AuthType Basic
    <Limit GET POST>
    require valid-user

Where username is replaced by your username, spelled in all lowercase letters.

Some operating systems don't like filenames beginning with a dot, or they are handled differently from other files. Here's an easy way to create the file that works around that problem.

  1. Copy the text above and paste it into a simple text editor, such as Notepad.
  2. Change the username on line 1.
  3. Save the file as htaccess.txt on your desktop.
  4. Upload the file to the directory you want to protect.
  5. Rename it .htaccess (dot-HT-access) on the server.

Until you set a password, no one can access the directory. We'll fix that next.

Next: Setting Passwords

EMU Home | Contact EMU | Site Map | Directories | Calendars | My.emich | Search