PDA

View Full Version : How can u made a page to be password protected?


LNinio
03-14-2006, 05:01 PM
I read "Using Dreamweaver and PHP to send form results in an email" (http://www.dreamweaverclub.com/dreamweaver-php-form.php) and i was very surpised how easy i could make it happen! It is really amazing!
Is there anything as easy is this example of how to lock a certain page with a password? I mean a page on a site which requires a password to be accessible. If anyone can help me with that I will be really grateful

ramandeep
03-14-2006, 05:09 PM
Hi Mate,
Did not got your question??
Can ya give bit more details ?

Creative Insanity
03-14-2006, 05:14 PM
One if the VTMs on the front page has included a login section.. sorry I can't remember which one though.

LNinio
03-14-2006, 05:18 PM
Hi Mate,
Did not got your question??
Can ya give bit more details ?
I wanna make a website in simple html, but i want to have one page of the site to be password protected, which it means that noone will be able to reach the contents of this particular page of the site unless he had the password.

One if the VTMs on the front page has included a login section.. sorry I can't remember which one though.
I will look for that VTM CI... thanks

ramandeep
03-14-2006, 05:30 PM
My questions was to your previous post which you edited :D he he
I am doing a tutorial on creating user authentication system with dreamweaver,PHP and MySQL , will be ready soon.

LNinio
03-14-2006, 06:29 PM
My questions was to your previous post which you edited :D he he
I am doing a tutorial on creating user authentication system with dreamweaver,PHP and MySQL , will be ready soon.
OK... thanks a lot

CI: Your VTM is also very helpful!

Creative Insanity
03-14-2006, 07:12 PM
I am not sure you can do that with html as it needs some server side stuff to gather the authentication and also you may want to use sessions so that no one else can access that login.. so I think that a scripting language is needed here.. and php is cheaper and all the team use php here as we are all tight buggers and don't wanna pay for asp hosting and make Mr Gates even richer. LOL

gmcrone
03-15-2006, 03:01 AM
The most secure method of password protecting a page, if you don't want a login system, is to use .htaccess password protection.

Do a google search on .htaccess and you will find all the info you need along with several sites that will create the encrypted password for you.

Mike...

Creative Insanity
03-15-2006, 04:53 AM
Good point GM.. that slipped my mind.

LNinio
03-15-2006, 10:08 AM
The most secure method of password protecting a page, if you don't want a login system, is to use .htaccess password protection.

Do a google search on .htaccess and you will find all the info you need along with several sites that will create the encrypted password for you.

Mike...
This is amazing but it doesn't work in my website! I think i make some mistakes!!! I am so sad, because it is just what i wanna do! :(

gmcrone
03-15-2006, 12:48 PM
Ask your Host/ISP if you can use .htaccess on your pages.
Most hosts allow it, then keep working on it.

Mike..

LNinio
03-15-2006, 12:56 PM
I think it allows because it pop up the "password window" but even if i type the correct username and password and after submition, the same window appears again and again and again but it never login to the protected area

gmcrone
03-15-2006, 01:03 PM
Did you encrypt the password, this is required.

If not go to
http://www.kxs.net/support/htaccess_pw.html

This will encrypt your name/password for you

also make sure your .htaccess file is in plain text and named .htaccess

Mike...

LNinio
03-15-2006, 01:32 PM
yes i did encrypt my password and all the other steps.
the only think i didn't get, is what path i suppose to put in "AuthUserFile " field.
For example... if my site has this tree (as it shown on ftp program)
"intranet"
"images"
index.html
contact.html

and i want to protect the "intranet" folder... in the "AuthUserFile" field i must type "/intranet/.htpasswd" and upload both .htaccess and .htpasswd in the "intranet" folder?

PS: And something elsi i don't get it... if you try to encypt the same username and password and u try it (for example) 5 times with the same username and password, you will get 5 different compinations (i.e. usn: test, pass: test... 1. test:ahSDAjdd1324, 2. test:AddkmaSdafs, 3. test:gfdhdkjQAEWD4352, 4. test:kjhgfhg43f5FSD, 5.test:BLVnhJEQgyxXk). Is it normal?

gmcrone
03-16-2006, 07:34 AM
I recommend putting the password file in a different dirctory than your "intranet" directory.
In setting the paths, use the full path:
http://myweb.com/intranet/.htaccess
http://myweb.com/.htpasswd

Getting a different encrypted password is normal

Mike...

LNinio
03-16-2006, 08:10 AM
When u say "full path" u mean something like "/public_html/www/html/.htpasswd"? If so, i think i am gonna contact my host company to tell me wich is the exactly path! Am i right? :)

a1websites
02-15-2010, 04:39 PM
The most secure method of password protecting a page, if you don't want a login system, is to use .htaccess password protection.

Do a google search on .htaccess and you will find all the info you need along with several sites that will create the encrypted password for you.

Mike...

8-)
Hi

.htaccess and .htpasswd always works fine but how do you log out!!!!

Frank