Recently I replaced an old .cgi file with a shiny new .php page. I realize everyone is still linking to the old .cgi file so I had need to forward them all onto the sexy new page. This can be accomplished as easily as the following:
Simply replace (after backing up) your .cgi file with the following contents
#!/path/to/perl print "Location: http://domain.com/newpage.php\n\n";