HTACCESS & HTPASSWD Help!

  1. #1
    jw123 is offline Newbie

    HTACCESS & HTPASSWD Help!

    Hi 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)

    AuthUserFile /home/content/j/s/c/username/directory/.htpasswd
    AuthGroupFile /dev/null
    AuthName directoryname
    AuthType Basic

    require user username

    THE HTPASSWD file looks like:
    userw

    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 says it's wrong.

    Can anyone help me out? Please email me at jordan9092@aol.com

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

    Jordan


  2. #2
    jw123 is offline Newbie
    when i typed up the original HTPASSWORD file above, it misread it as a smilie face. it should be user colon password with no spaces between them..

    thanks!

  3. #3
    D-A-L is online now D-A-L Administrator
    I use this tool to create the password. http://www.kxs.net/support/htaccess_pw.html

    This tells you a bit more about the .htaccess file - http://www.javascriptkit.com/howto/htaccess3.shtml

  4. #4
    jw123 is offline Newbie
    Thanks for the help.

    I used the password link you sent me and uploaded it after I put it in but im still having problems... is there anything wrong with the way the HTACCESS is setup?

    I put the HTACCESS and HTPASSWD File in the directory that i want password protected as well.

    I dont get why it wont work... any thoughts? id appreciate any more help..

    Thanks!
    Jordan

  5. #5
    HappyBeaver is offline Bea*ering Away!
    You should put a ticket in to your webhost - there may be circumstances that aren't allowing you to do what you're trying to do.

  6. #6
    jw123 is offline Newbie
    Hey - I tried that... they wouldnt help

  7. #7
    D-A-L is online now D-A-L Administrator
    Can you post the contents of each file here so we can see. Use the [code] and [/code ] tags to display each page. For more help on how to use the [code] tags see here - http://www.d-a-l.com/help/misc.php?do=bbcode#code

    e.g.

    .htaccess page
    Code:
    This is the code in my .htaccess page
    .htpasswd page
    Code:
    This is the code in my .htpasswd page

  8. #8
    jw123 is offline Newbie
    Thanks for the help....

    FOR HTACCESS:

    Code:
    AuthUserFile /home/content/j/s/c/jschlecter/jasansherman/.htpasswd
    AuthGroupFile /dev/null
    AuthName EnterPassword
    AuthType Basic
    
    require user jasan
    for HTPASSWD
    Code:
     
    jasan:QjMmvZymQl.qA

    Thanks!

  9. #9
    jw123 is offline Newbie
    does anyone know why it's not working?

  10. #10
    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