SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2001
    0 Post(s)
    0 Thread(s)

    Angry .htaccess help!!!

    I'm getting very frustrated , which means I most likely doing some very small error. But its driving me nuts!!! I can't seen to get the .htaccess stuff to work. Here is my .htacces file:
    AuthUserFile /usr/local/access/.htpasswd
    AuthName Please enter a password
    AuthType Basic
    <Limit GET POST>
    order allow,deny
    allow from all
    require valid-user
    I'm wanting to password protect a particular directory, say "", so I place the above file in "/public_directory/privateStuff", the I cd to "/usr/local/access/" and issue the following command:
    hwpasswd -c .htpasswd username
    I'm prompted for my password, and then I verify it. I check the .htpasswd file, and my username appears next to the encrypted password.

    What am I doing wrong? Help please!
    Whatever happened to BeOS?

  2. #2
    SitePoint Wizard Crowe's Avatar
    Join Date
    Nov 2001
    2 Post(s)
    0 Thread(s)
    Your htaccess file is a little off. First, when you have more than one word for authname, you must put it in quotes. There is what it should look like:

    # Access file
    order allow,deny
    allow from all
    require valid-user
    Authname "Please Enter a Password"
    AuthPAM_Enabled off
    Authtype Basic
    AuthUserFile "/public_directory/privateStuff/.htpasswd


    Or, you can put the .htpassword file anyway. You can also run the htpasswd command from anywhere. It's just easier to run it from the directory your going to place your .htpasswd file in.

    You should read

    The Site Point Article: .htaccess - The Complete Guide by Mike Russell
    which is one of the best and most complete .htaccess guides I've ever seen.
    Chrispian H. Burks
    Nothing To Say


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts