Problem in htaccess password protection

Discussion in 'PHP' started by sunil_23413, Sep 29, 2009.

  1. #1
    I want to apply htaccess password protection to one of my my site http://manjotone.freehostia.com .
    When I go to above url it demands a username/password. Even if I fill correct username/password (test/test) it still does not show the site and the login box appears each time whether I fill correct or wrong username/password. How can I resolve this issue?
    The content of htaccess file is
    AuthName "Restricted Area"
    AuthType Basic
    AuthUserFile /home/www/manjotone.freehostia.com/.htpasswd
    AuthGroupFile /dev/null
    require valid-user

    And the content of htpasswd file is
    test:VKDgrEqD7TJBM

    I simply upload these files through FTP where my site exists .please suggest me what should I do to overcome this issue.
     
    sunil_23413, Sep 29, 2009 IP
  2. califmerchant

    califmerchant Active Member

    Messages:
    112
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    63
    #2
    AuthUserFile path_to_password_file
    AuthGroupFile /dev/null
    AuthName RESTRICTED
    AuthType Basic

    <Limit GET POST>
    require valid-user
    </Limit>
     
    califmerchant, Sep 29, 2009 IP
  3. califmerchant

    califmerchant Active Member

    Messages:
    112
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    63
    #3
    also check that the location of the .htpasswd file is correct and its readable (permissions 644)
     
    califmerchant, Sep 29, 2009 IP