If you do something like this in your main html directory it should protect everything below in all the sub directories.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://255.255.255.255/.*$ [NC]
RewriteRule .*\.[Jj][Pp][Gg]$ - [F]
RewriteCond %{HTTP_REFERER} !^http://name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.name.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://255.255.255.255/.*$ [NC]
RewriteRule .*\.[Gg][Ii][Ff]$ - [F]
You can also add other domains by just making another set of lines with all 3 of their options with "www", with out "www", and the IP # of the domain. If you tell me all the domains that you want to be able to link from, I'll make the exact .htaccess file for you and post it back here
Tim