How to create and edit .htaccess and .htpasswd locally on my computer and then upload to my site via ftp?

27,133

Solution 1

.htaccess and .htpasswd files are just text file so you can create them locally then upload them
To create a file starting with '.' on windows see http://www.htaccesstools.com/htaccess-faq/
To create encrypted password for .htpasswd files you can use http://www.htaccesstools.com/htpasswd-generator/

Solution 2

You can also download the Apache 2.2 binaries and use htpasswd.exe or htdigest.exe to generate the .htpasswd or .htdigest files on windows.

Solution 3

The generator in the accepted answer seems to no longer be active. However, this one seems to work: https://www.askapache.com/online-tools/htpasswd-generator/

Share:
27,133

Related videos on Youtube

cstack
Author by

cstack

Updated on September 17, 2022

Comments

  • cstack
    cstack over 1 year

    I'm making a website for a client, and I want to make a password protected directory. The problem is my account type only allows FTP, so is there any way to create the .htaccess and .htpasswd files locally on my computer so I can upload them via FTP?

    UPDATE:

    I made the files on the site @radius mentioned, and I uploaded and renamed them, but now I'm getting the following message:

    "The server encountered an internal error or misconfiguration and was unable to complete your request"

  • Philip
    Philip almost 14 years
    +1, or create a htaccess.txt and htpasswd.txt files, upload them, then rename them on the ftp server.
  • cstack
    cstack almost 14 years
    The website made the files alright, but when I uploaded them and went to a page in the directory, I got "The server encountered an internal error or misconfiguration and was unable to complete your request"
  • radius
    radius almost 14 years
    What is the content of your .htaccess file ?
  • cstack
    cstack almost 14 years
    Okay, the tool you linked to works fine. I just entered the wrong thing into ".htpasswd File Location" ("/path/to" instead of "/path/to/.htpasswd") Thanks for the help.
  • THE JOATMON
    THE JOATMON over 4 years
    Either this site has changed or I'm really dumb, because I literally see an <img> tag of a form, but no interactive form.