Take a look at: http://www.webmasterworld.com/apache/3389121.htm
This is the exact question you are asking with some good answers. Example from POST. Put in your .httaccess file.
Lets say that the filename the user sees has aaa- or bbb- etc prepended, and that the actual folder names are /111/ and /222/ etc.
These names can be whatever you want them to be, you decide what they are and make a list somewhere to refer to as you modify the code:
# == REDIRECTS to PROTECT FOLDER nameS FROM BEING INDEXED ==
# Redirect a direct request for any /nnn folder URL back to root to avoid Duplicate Content (also fixes domain as www).
rewriteCond %{REQUEST_URI} ^111 [NC]
rewriteRule ^111/(.*)$ http://www.main-site.com/aaa-$1 [R=301,L]
rewriteCond %{REQUEST_URI} ^222 [NC]
rewriteRule ^222/(.*)$ http://www.main-site.com/bbb-$1 [R=301,L]
rewriteCond %{REQUEST_URI} ^333 [NC]
rewriteRule ^333/(.*)$ http://www.main-site.com/ccc-$1 [R=301,L]
# == REDIRECT ALL NON-WWW REQUESTS to WWW ==
# Redirect any non-www request to www to avoid Duplicate Content problems.
rewriteCond %{HTTP_HOST} ^main-site\.com [NC]
rewriteRule ^(.*)$ http://www.main-site.com/$1 [R=301,L]
# == rewrite BASE URLS to FOLDERS ==
# Silently rewrite a request that is not for a /nnn URL to the nnn folder (www has already been fixed by previous rule).
rewriteCond %{REQUEST_URI}!(.*)111
rewriteRule ^aaa-(.*)$ /111/$1 [L]
rewriteCond %{REQUEST_URI}!(.*)222
rewriteRule ^bbb-(.*)$ /222/$1 [L]
rewriteCond %{REQUEST_URI}!(.*)333
rewriteRule ^ccc-(.*)$ /333/$1 [L]