wetsand has asked for the wisdom of the Perl Monks concerning the following question:

Sorry I'm a newbie when it comes to pearl. Trying to 301 old legacy files like oldsite.com/green/red.cgi/blue/ using this htaccess code: Redirect 301 /green/red.cgi/blue/ http://www.newsite.com/summary-page/ Instead it's redirecting to: newsite.com/red.cgi/blue/ FYI oldsite.com's htaccess file does not have any global 301 rules that would conflict How can I redirect these CGI files properly? Thanks.

Replies are listed 'Best First'.
Re: 301 Redirect CGI URL
by Anonymous Monk on Apr 30, 2015 at 02:54 UTC

    Edit the programs

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

    Then go study apache manual until you figure out .htaccess