I have a wordpress install in the root directory but also have a directory called 'admin' which contains a PHP membership system. I couldn't initially access this directory as I kept getting a 404 on the Wordpress site but added:
ErrorDocument 401 default
in to the .htaccess file and the 'admin' folder then became accessable. The admin folder now needs to be password protected so I have given it a htaccess file of its own containing:
AuthType Basic AuthName "restricted area" AuthUserFile xx.xxx.xxx.xx/public_html/admin/.htpasswd require valid-user
but this now makes the 'admin' folder inaccessable again, is there something I need to put in either of the htaccess files to make this work or is there a different method of password protecting the admin folder without using htaccess?