This question really does not have anything to do with PHP!
But... I'll answer your questions any-who.
Just create another .htaccess in each sub-folder. Let's say in the root you have
Deny from all
but in the sub-folder /public/ you want anyone to access it, so reverse it with..
Allow from all
More info:
http://httpd.apache.org/docs/howto/htaccess.html
HTH