HTACCESS & HTPASSWD Problems

  1. #1
    jw123 is offline Newbie

    HTACCESS & HTPASSWD Problems

    i Everyone,

    I was wondering if anyone could help me out with a problem Im having with setting up a password protected directory for my site.

    THE HTACCESS Looks like
    (this is the way go daddy suggests doing it. the 'username' is obviously my FTP username and the 'directory' is the directory I wanted to password protect)

    Code:
    AuthUserFile /home/content/j/s/c/username/foldername/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic
    
    require user username

    THE HTPASSWD file looks like:
    Code:
    user:password
    I uploaded both documents to the directory folder and when i go to that specific path it asks me for a user/pw which is good but when i type in what i have in the HTPASSWD file, it pops up the box again as if I'd typed it in incorrectly...


    Thank you for all your help! I greatly appreciate it. I've been struggling for hours trying to figure it out!

    Jordan


  2. #2
    HappyBeaver is offline Bea*ering Away!
    Tackle the Web with $5.99 .COM's from Go Daddy!
    Hi there.... I've just done a test one over at my own site and used this .htaccess file in the root of the folder I wanted to protect.

    Code:
    AuthType Basic
    
    AuthName "secret"
    
    AuthUserFile "/home/your site username/.htpasswds/folder to protect/passwd"
    
    
    require valid-user
    Having first set up the necessary password protection in Cpanel (Password Protect Directories) making sure I've ticked the Directory requires a password to access via the web (you must check this to activate password protection). and setting the Active Users with a username and password for the valid user.

    Hope that helps

+ Reply to Thread