why not use a redirect...
redirect:
Redirect /olddirectory/oldfile.html
http://yoursite.com/newdirectory/newfile.html
or
if the only thing in the cgi directory that is erroroing is the webfeed.cgi you could handle it with an errordocument.
errordocument:
ErrorDocument 500
http://yoursite.com/newdirectory/newfile.html
but yes, it could probably be done with a rewrite. Would take more code though