Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2004
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htpasswd and .htaccess

    Hi guys,

    I'm pretty new at this password thing so I'm gonna ask a lot of n00bish questions.

    First, how do I get the encrypted version of the password that I wanna place in my .htpasswd file? Is it case-sensitive?

    Second, what is the 'full path' to the .htpassword? If i'm on apache server with the html folder being the root, and my .htpasswd file is located inside a folder called user, can i just do "AuthUserFile /user/.htpasswd" ?

    Finally, is it possible to let the user change their password through the web? If so, how?

    Thanx in advance for the help

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You need to run an md5 encryption algorithm on the password you want to use, then you can put the encrypted version into the .htpasswd file.

    You can do this easily by making a php page and inserting this code:
    PHP Code:
    <? echo md5("YourPassword"?>
    And yes, the password is case sensitive.

    I also suggest this guide: http://www.javascriptkit.com/howto/htaccess.shtml
    OracleGuy


  •  

    Posting Permissions

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