Password Protection on the Web
Download
Report
Transcript Password Protection on the Web
PASSWORD PROTECTION ON THE
WEB USING .HTACCESS
Connect Session
May, 2012
Password Protection
• Today we’re going to protect this web page:
• http://www.coopext.colostate.edu/comptrain/secret/
• .htaccess will create a pop-up window asking for a
usdername and password
What is .htaccess?
• Reliably password protects folders and files on the web
• No back doors into the password
• One username and one password to access or multiple users with
multiple passwords
• Does not require a back-end database to support
• Two small notepad files involved
• All PCs have notepad already
• Can’t find it?
• Type “notepad” into the Find box (click the Start button, it’s at the lower
right)
How do I use it?
• Go to: http://tools.dynamicdrive.com/password/
• Enter usernames and passwords
• Enter pathname to file:
• /cwis/user/cwis391/WWW/pw/
• Your cwis### will be different
• Your folder at the end of path (e.g. /pw/) may be different
• Only thing in it will be password file
• Created just for the file (to hide it)
• Site returns code for 2 files
What you enter:
What you get:
Creating the files
• Cut and paste code into Notepad
• Save files as
• .htaccess.txt (first bit of code)
• .htpasswd.txt (second bit of code)
• .htaccess goes in the folder you want to protect (/secret)
• .htpasswd goes in the password folder (/pw)
• Take off the .txt in Dreamweaver
• .htaccess
• .htpasswd
• Upload!