a small amount of php/perl/asp etc... will get the job done. Figure out what's available to you on that server and we'll see if we can help you better.
a small amount of php/perl/asp etc... will get the job done. Figure out what's available to you on that server and we'll see if we can help you better.
"You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter
Here's an example .htaccess file - this FILE is simply a text called .htaccess
You would store your usernames and password in a FILE called .htpassword - Here's how the .htpassword would look:Code:# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit POST PUT DELETE> order deny,allow deny from all </Limit> AuthName www.someplace.com AuthUserFile /www/htdocs/domains/s11/01695/www.someplace.com/webdocs/_vti_pvt/service.pwd AuthGroupFile /www/htdocs/domains/s11/01695/www.someplace.com/webdocs/_vti_pvt/service.grp
SEE my username is on the leftside and on the right is my password.Code:onestiffrod:ghyrxy123
There is a little bit to learn here but it looks more complicated than it really is.
My Avatar says: "Stay in School"
Rocco is the Boy!
"SHUT YOUR LIPS..."
hehe.... you wan esay code? no problem!!Originally posted by hermit
Hi,
How do i create a site with login-password. For example i have a link to this PRIVATE SECTION. What kind of tools do i need? Please advice
check at my index.htm (http://dd.na.to), there's a link "admin", link it. and then view the source code and copy it. easy easy easy!!
well im not confident on doing scripts like php or asp. looks damn complicated . . .
jus tell me in simple terms, what do i need to learn ?
PHP scripts? or ASP right?
- - fUnKy F3m@le - -
http://www.euronet.nl/~arnow/htpassw...mentation.html
Here, I'll do it for ya...
Let's first create a .htpasswd file...
Now upload that .htpasswd file to your web, create a special folder would be best and simply place the file there, let's just call the folder where the file is 'users'. You can see that the .htpasswd file contains the user 'hermit' with a password of '12345'.Code:This is the .htpasswd file hermit:12345
Now, let's create the .htaccess file...
Change anything in BOLD.Code:This is the .htaccess file <Files .htaccess> order allow,deny deny from all </Files> AuthUserFile /home/users/.htpasswd AuthGroupFile /dev/null AuthName Password page AuthType Basic require valid-user
1) Change the AuthUserFile to the Folder where you have the .htpasswd file - this is a PATH so I think /home/ represents the root or www.yourplace.com you know your site address so all you have to change is the Folder name after.
2) You can change AuthName to something like Hermit's Page
Now, just upload the .htaccess file to the Particular Folder you want password protected.
Here's a cgi program -FREE- that can simplify some of this for you.
http://www.locked-area.com/html/dp/download.html
Last edited by OneStiffRod; 11-22-2002 at 12:43 AM.
My Avatar says: "Stay in School"
Rocco is the Boy!
"SHUT YOUR LIPS..."
i would recomend ASP with an access database.. it is easy to manage accounts and you can even write and admin page to change those.. but the obnly problem is... if your database is not in a secure place.. if people know the ful path theu can download the database.....
So in my home page i have made my database file 45 char log with all junks.. still searching for a secure place to keep it....
and in ASP each page before seving itself it can check if the user is a valid one or not...
The solution OneStiffRod has given is also good but has some draw backs... you cannot easily get the state of the member on the page.. for different sectiion of users you will have to create different folders etc ect.. If you are a bugy programmer you better use his method since in ASP if you make a bug it can be exploited to access any pages.. And if he get access to one of the pages...(password protected) he can use the same trust(cookie , session variables etc eetc) whch other pages will recoognize as an authorized user...
>>looks damn hard
you're not ready for this kind of thing yet. If you're not comfotable with doing the scripts either you're lazy or you're a clueless html weekend warrior (dont take that personally that's where we all start). I suggest starting otu doing simple things first to get a grip on the languages before taking on such a daunting task...for now try the htaccess thing, that'll be the easiest, no programming required.
PHP and XML
Let's talk about SAX
.htaccess is very robust and there is a ton more you can learn if you wish about it. For instance you can create a .htgroup file so you can have GROUPS of users with different levels of access. And I think you may be able to create/monitor sessions so you can tell if someone is currently logged in.
The database stuff can become very complicated but is very good also for security.
Here's yet another tut about it - this one is probably the easiest to understand.
http://hotwired.lycos.com/webmonkey/...tml?tw=backend
Last edited by OneStiffRod; 11-24-2002 at 03:21 PM.
My Avatar says: "Stay in School"
Rocco is the Boy!
"SHUT YOUR LIPS..."