Jun 13, 2006
So right now I'm running a VB site out of parent_html directory.

.htaccess is located in this directory but is not preventing hotlinking. Where should I move it to do so?

Secondly, I've heard that I should protect admin_cp with .htaccess and .htpasswd. So, from what I understand I put .htpasswd into my main directory (above parent_html) in the .htpasswd folder with the following code:


Now, I'll be using this converter thingamadoodle:


Anyway, since I'm protecting admin_cp I'll be putting the admin username and login there (NOT my cpanel login, correct?)

From there, I'll put a .htaccess file where? And do I need another one, separate from my prevent hotlinking one.

From what I know that .htaccess will have this code:

AuthUserFile /usr/local/you/safedir/.htpasswd [this will change based on my directory]
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user wsabstract [this will change based on username]

Then, I'll also add this code:

<Files .htaccess>
order allow,deny
deny from all

to the .htaccess file.

Alright, at that point then I should be good to go, correct?

My main questions are these:

Do I need two .htaccess files (one for hotlinking, one for the passwords)?
Where do I put these .htaccess file(s) (one for hotlinking, one for pw protection on my admin_cp folder)?
Does all my coding look correct?
Should I also CHMOD the .htaccess for extra protection?
The reason I might need 2 is because they may need to go in multiple places, but also if I CHMOD the hotlink one, then it may not work, but I'm not sure.

Sorry for the long post, hope I can get this sorted out.