September 2nd, 2003, 04:55 PM
putting a password prompt on a webpage?
how would i put a password and username prompt on this before the page loads?
September 2nd, 2003, 04:59 PM
Use .htaccess files:
Search a bit on your own next time, very easy to find with google.
I searched google for passwording webpages
The above sentences are produced by the propaganda and indoctrination of people manipulating my mind since 1987, hence, I cannot be held responsible for this post\'s content
September 2nd, 2003, 05:08 PM
If its an apache server use an .htaccess file. Its basic and will provide basic user/pass login.
Your basic .htaccess file
ErrorDocument 401 /cgiproxy/unauthorized.html
Line 1: ErrorDocument 401 webpage...
User does not authenticate, and is redirected to a custom "You shall not pass!" page.
You can do the same for all other error numbers as well, IE 404, etc
ps: remember to put these pages in an unsecured/public portion of the site. Won't do much good if they are in the secure part and can only be seen by valid users.
ErrorDocument error_number URL
Well, before I get all into it.. What type of server are you using, and is it your local machine or paid hosting?
September 2nd, 2003, 05:36 PM
this is on a paid server. using apache so i can ftp to it
September 3rd, 2003, 11:21 AM
it can be done using .htaccess but just to inform u guys there is a product "SiteMinder" from the US based compnay netegrity( www.netegrity.com) which does take care of securing ur web server (apache , iplanet, domino or others) using various authentication schemes like username password, identrus, RSA secure id , form based, certificate based , CRL support and so on . it also provides u Single sign on capability.
September 3rd, 2003, 12:43 PM
if its paid hosting they will normally have an option in your cpanel to set passwords for certain files or folders in your dir - just means you dont have to go mucking about with .htaccess yourself just point and click