Sorry for the late reply, I was on vacation.
Your rewrite rule should work at vhost level, or in .htaccess file if there is no multiple contexts involved.
For example, if you have a vhost with document root at /www/vhost1/html/, and a context "/cgi-bin/"=> "/www/vhost1/html/cgi-bin/", and...