EDIT: Doing this with robots.txt isn't good enough for me.
This code block entire site from google. I do not know how to keep this code functional but allow google to access one folder on the site.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteRule ^(.*)$ - [F,L]
Does this works if i had 2 conditions?
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_USER_AGENT} yahoo [OR]
RewriteCond %{REQUEST_URI} !^/allowed-folder/ [NC]
RewriteRule ^ - [F,L]