in reply to 301 Redirect CGI URL

Edit the programs

#!/usr/bin/perl -- use CGI(); print CGI->redirect( 'http://anythingyouwant' ); exit;

Then go study apache manual until you figure out .htaccess