3. The 401 Handler

Now use a web browser to access one of the web pages in the protected directory. You should be prompted to log in before the page is actually served. However, because we have not yet set up your password, you will not be able to successfully log in. Cancel the log in attempt. You should then be directed to the web page 401Errorhandling/error401.html.

The "401" error is the code for a failed user authentication (login). You were redirected to this page because the .htaccess file specified it as the handler for this kind of error (triggered when you cancelled the attempted login).

Click on the "Refresh Password Info" button. You should soon be redirected to the page you had been trying to access. This time, however, you should be able to log in sucessfully. If you then look in your protected directory, you will find that an .htpasswd file has been created and populated with encrypted passwords for the instructors.