FWIW, the example I posted works for me. Anyway, what that error hints to me is that the RewriteCond isn't working correctly (it's not letting requests to index.cgi through, instead it's redirecting them). If you turn on log level 9, mod_rewrite will write out *everything* it does; that should help in debugging.