Need help understanding .htaccess

Hi everyone,

I’m having some major issues understanding and getting .htaccess to work. It appears that the .htaccess option in the DreamHost “Goodies” menu will do exactly what I want, the problem is, I can’t get it to work.

I want to create a “Member’s Area” on my webpage. I have all the files currently uploaded to one directory on my FTP server. Currently everything on the site works perfectly fine and as I expect it to. But, as soon as I create the new directory for the files I want to password protect, the main part of my page works fine but when I click on the link in the .htaccess section of the DreamHost panel, I get a 404 Not Found error. That’s happened every time I’ve tried using this method.

Could someone please help me? I’m a total newbie to building websites and I’m doing this for a group I work for to help us get exposure and help the students we teach. Could someone possibly help me with a step-by-step how to? Thank you in advance for any help that is offered.

If you have a website called say and your files that you want to be in your ‘Members Area’ are say at then when you go to the Dreamhost htaccess/webdav page on the control panel you would first select your website e.g.

Then on the next page you would add your members file folder name to the end of your website ( so that it now reads

Tick the box which says 'Password protect this dir?

In the ‘Directory “name”:’ box type a name for your area such as Members Area or My Groups Files.

In the ‘User accounts for this area:’ box you would overtype the already added ‘user password’ entry with a user name and a password. The user name does not have to be any of your already created user names but could be something like ‘members’ or ‘year2012’. The password is as you’d expect a good mix of letters and numbers and characters like % etc.

At this point you can select the ‘Forbid linking to files in this dir?
’ if you wish which is to stop people with websites elsewhere linking to your images and media files unless you wish them to. In which case you could add their website to the box shown.

Click the ‘change these settings’ button and after a few minutes the .htaccess file will appear in your folder and this folder will then be protected requiring the ‘user password’ combination to be entered.

Note that any folders beneath will also be protected by the same user/password. So will be protected as well.

If you have protected with a user/password then the whole site will be protected by that user/password.

You can Google .htaccess to get some useful information but be careful what you do as you can lock yourself out of your website. Although you would just need to delete the problem .htaccess file via ftp or ssh.