Site Statistics
 
Threads: 3,853
Posts: 17,029
Members: 2,895
Users Online: 12
Newest Member: yhangjoy


Go Back   PC101 > The Internet, Web Design & Networking > Web Design and Development

Web Design and Development Design techniques, conepts, HTML, scripts, software, reviews, sponsors and affiliate programs.


Reply
 
LinkBack Thread Tools Display Modes
Old 06-06-2006, 08:52 AM   #1
Junior Member
 
Join Date: Jun 2006
Posts: 1
Rep Power: 0 Michelle Ricardo is on a distinguished road
How to Password Protect Pages on Website?

How can I password protect certain pages on my web web site?

My web host is running Apache.

Thanks!!!

Michelle
Michelle Ricardo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-06-2006, 02:48 PM   #2
Distinguished Member
 
Join Date: Jul 2005
Posts: 2,208
Rep Power: 5 Will.Spencer is on a distinguished road
This is done with two files, .htaccess and .htpassword.

First, create (or upload) a file called .htaccess to the web directory which you would like to password protect. The .htaccess file will look something like this:
Code:
AuthType Basic
AuthName "Michelle's Web Site"
AuthUserFile /usr/local/www/data/michelle.com/.htpasswd
Require user michelle
You will need to set AuthUserFile to the location of your .htpassword file.

In this file, your username is "michelle."

Next, create (or upload) a file called .htpassword to the same directory. The .htpassword file will look something like this:
Code:
 michelle:yL05LynwCLoxQ
Once these two files are in place, you are ready to login.

This is where things get tricky.

You may be asking "What the heck is yL05LynwCLoxQ?"

yL05LynwCLoxQ is the (sort of) encrypted version of your password. Your actual password, in this example, is "r0ckZ".

Most tutorials tell you to run the htpassword command to create an encrypted version of your password. Of course, with some Unix hosting setups -- you don't have access to a Unix shell to run the htpassword command! The solution is to use a web-based password generator such as the Showcase password generator.

A much more in-depth explanation of Apache user authentication can be found at Apache.org under Authentication, Authorization, and Access Control.
Will.Spencer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-15-2006, 11:21 AM   #3
Member
 
Join Date: Jun 2006
Posts: 111
Rep Power: 3 darviria is on a distinguished road
Or write your own in PHP and MySQL if you have support for it. But make sure you know how to do it properly
darviria is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Codes on IBM 600 opie Graphic/Utility/Business Software 15 10-16-2006 06:11 AM
Password Reset Disk Lyte Tutorials and How-To... 1 08-21-2006 08:34 PM
What if you forget your Windows XP admin password dhruvd Windows Vista, XP, 2000, 98, etc... 0 08-06-2006 05:42 PM
[XP] Password Trick moe88 Tutorials and How-To... 4 06-01-2006 12:33 PM
software to password protect drive kbelloise Graphic/Utility/Business Software 4 12-17-2005 09:26 PM



All times are GMT -5. The time now is 04:10 AM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5