httpd.conf (for debugging purposes):
.htaccess file in your main document root:
RewriteRule ^directory/(.*) cgi-bin/script?args=$1 [L]
This took me a while to figure out.. and it isn't perfect ofcourse. Consider
directory to be the virtual directory you wish to use.