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:
- Start by downloading and unzipping: securelogin.zip
It contains the following files:
-
login.asp
-
securethispage.asp
-
index.asp
- Copy the contents of that file to your webspace you want to secure. example: a folder called "secure"
- Open the file login.asp and change the default username (admin) and password (test) to something you want to use.
- Login to your site through a browser... http://www.uncc.edu/yourarea/secure/
- You will be redirected to the login.asp page. Enter in your username and password.
- If your info is correct you will be allowed to view index.asp
- 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
|