.htaccess not producing password

I have been trying to password-protect a folder using the Htaccess area of the DreamHost Web Panel. When I follow the link, however, I am taken to a blank page within my website (which is to say it looks like my website but there is no data on the page). When I delete .htaccess and .htpasswd from the folder, I am able to access the list of files in the folder when I follow the link. (There is, obviously, no password protection in this case.)

What am I missing? I have the sense that I have not done something really obvious or basic. Any suggestions?

Thank you.

You’re probably going to have to post the contents of your .htaccess for us to be of much help.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!

The .htaccess file is:

AuthType Basic
AuthUserFile /home/r_diaz/dmculturalservicesltd.com/t_munson/.htpasswd
AuthName "Thomas Munson Files"
require valid-user

This file was generated by the Dreamhost .htaccess area under ‘goodies.’ I did not write the file. I suppose it may need to be modified in some way.

Thanks for any tips.

I think you might have another issue. The .htaccess file looks fine (it looks just like mine), but you might have another rewrite rule or something that is causing problems.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!

Posting the url to you site very much helps identify the problem (as is often the case). :wink:

Wholly is right on the money. From looking at your site, it is obvious that it is using WordPress and that another .,htaccess file (in your “main” directory - /home/r_diaz/dmculturalservicesltd.com/) is in place providing rewrite rules. (note the “pretty” urls on your links).

The unexpected behavior you are getting when trying to navigate to the url http://dmculturalservicesltd.com/t_munson/ is the result of these rules. WordPress “traps” urls that are not part of it’s system and this is what is happening to you. The .htaccess file in the dmculturalservices.com directory affects all directories beneath it if not modified by and an .htaccess file in that directory. As it is, the .htaccess file in t_munson directory never gets read, because the “higher” .htaccess file is intercepting the request and rewriting the url.

It is very similar to the problem you would experience if you navigate to the url http://dmculturalservicesltd.com/stats/ and there is a great guide to resolving this on the DreamHost Wiki.

Take a look at the DreamHost Wiki Article on Making Stats Available with .htaccess for a discussion this situation and an example of how to fix it for a “stats” sub-directory. You need to make the same “fix”, but substitute “t_munson” for "stats’ in the examples.


Thank you, wholly and rlparker. The conflict with wordpress makes good sense. I’ll follow through with your instructions. TFM