Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password protect a site

Status
Not open for further replies.

CuriousGuy

Programmer
Nov 29, 2002
17
US
I have a website within a three frame layout, and one of the windows needs to be password protected.
How do i set the password, and prompt the user to enter it prior to accessing the site?

Any help at all will be much appreciated
 
There a 2 easy ways i can think, first one is download a cgi password script(asuming your server allows you access to a cgi-bin). You can find heaps at Or secondly (if your server is a unix server) connect to your site place the file(s) you want in a new folder, then creating a .htaccess file which passwords protects teh directory. If you know nothing at all baout web servers i recomend teh first choice, most cgi scripts are easy to configure, no knowledge or perl required.
 
Another alternative is to have an Access DB that stores the passwords - would mean writing some of the web pages in ASP to enable this to be done.
 
Easiest way I see, as already mentioned, is to put all pages you want to protect in a directory which has a .htaccess and .htpasswd file. When the page is requested the user will be prompted for a username & pass.
Setting this up is very easy.


::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top