Welcome, Guest. [ Log In ]
Question   Password-Protecting Directories
Search KBase


Related Links:
· What kind of password do you suggest I use?
· Using shell commands to password protect directories
· Custom 401 (Failed Authorization) error pages.

Top 5 in this Area:
1. Password-Protecting Directories
2. Using shell commands to password protect directories
3. Setting up WebDAV on Windows 2000 or Windows XP
4. Setting Up WebDAV on Mac OS X Using Finder
5. After installing XP SP2, WebDAV no longer works.

 
Password-Protecting Directories
You can set up a password-protected directory (it doesn't work for individual files, only directories!) through the "Goodies > Htaccess / WebDAV" area of our Web Panel. Here's how:

  1. If you have more than one domain with us, click on the domain you'd like to protect a directory under.
  2. Click on "Set up a new directory" (or "Add Another" if you already have one).
  3. On the next page:
    • Enter the directory you'd like to protect (leave it blank to protect the entire domain.
    • Enter the name you'd like to call this area (this will appear in the pop-up window asking for your password).
    • Enter a list of all the valid usernames and passwords, each pair on the same line separated by a space, one pair per line, for this password-protected directory.
    • (optionally set up WebDAV and/or "Link Protection")
    • Click the button!
  4. Within five minutes that directory on your site will be protected!
You can also accomplish the same thing with shell commands. Using shell commands to password protect directories.

After password-protecting your directory, you can also customize the error message users receive when they enter the wrong username and password.

Last updated: Nov 05, 2004.

Official Reply (2005-06-28 17:30:48 )
does webdav/password protecting a directory affect Ftp uploads?
User Post (2005-11-23 14:42:45 by baldurlokii)
How do you turn off Directory Indexing?
I have password protected the directory, but once someone has gained access, I want them to not able to navigate around the directory.
Thanks
User Post (2005-09-18 11:00:55 by joyeuse)
I did something dumb, set up a protected directory, and now I can't remember the password! How do I remove the password protection? Or, alternatively, is there a way to look up the password?
User Post (2005-03-31 21:31:29 by martz)
Be careful if you decide to use this feature to password-protect a WordPress directory -- it altered my .htaccess file and delted the WordPress information from it, forcing me to reinstall WordPress.
User Post (2005-03-17 13:40:39 by joeygun)
Can wild card characters be used to protect all subdirectories below a directory you do not want to protect?
User Post (2005-01-16 15:20:46 by sgrainer)
I tried to password-protect a directory after using an "AddType php-cgi .html" statement (to force the server to parse .html pages as PHP pages) in a higher-level .htaccess file, and kept receiving the error message: "No input file selected." I fiddled around and found that the AddType statement was causing the password protection to break for some reason. (When it was removed, password protection worked perfectly; otherwise, I would receive the same error as above and no login dialog box.) Instead of using the "AddType php-cgi .html", I used "AddType application/x-httpd-php .html" and both the PHP parsing and the password protection worked. Hope this helps others who might have the same problems.
User Post (2004-05-12 14:59:14 by frontweb)
You can also block/allow by IP addresses, if that makes more sense. Say your company has internet access using a static IP -- you can set things up so only traffic from that IP can see the site. There's more information on this at http://home.golden.net/htaccess.html