Secure Login:

This how-to document for creating a very simple secure folder. It requires ASP on a windows server... which is enabled for most of the webservers here on campus. This code will provide you a way to require a common username/password gain access to various pages.

Example: http://www.uncc.edu/secure/
Username: admin
Password:  test

START:

  1. Start by downloading and unzipping: securelogin.zip

    It contains the following files:
       -
    login.asp
       -
    securethispage.asp
       -
    index.asp

  2. Copy the contents of that file to your webspace you want to secure. example: a folder called "secure"

  3. Open the file login.asp and change the default username (admin) and password (test) to something you want to use.
  4. Login to your site through a browser... http://www.uncc.edu/yourarea/secure/
  5. You will be redirected to the login.asp page. Enter in your username and password.
  6. If your info is correct you will be allowed to view index.asp
  7. To secure other pages add this line to the top of an of your pages:
    <!--#include file="securethispage.asp"-->

    Note: this file calls the file securethispage.asp. If you have pages inside of a folder that needs to be secure, you will need to change this include to point back further...

    example: <!--#include file="../securethispage.asp"-->
    this backs up a directory to make the include pull in.




Updated: March 28, 2005 by David McIntosh