I've got a URL: www.foo.com/bar/*.cgi

inshtaccess, I want it to redirect to

www.blah.com/bar/*.cgi

Only when the subdirectory consists of "bar"

What is the correct syntax to complete .htaccess?

Something similar to this will get it done

RewriteEngine on
RewriteRule ^/bar/(.*)$ http://www.blah.com/bar/$1 [L]