redirection perl script

Discussion in 'Site & Server Administration' started by leeds1, Dec 30, 2004.

  1. #1
    I have been searching on google :)() for ages for a script that does the following:

    mydomain.com/something.cgi?affid=lotsandlotsofcodeandnumbers

    which will direct to

    affiliate.com/lotsandlotsofcodeandnumbers

    any ideas

    thanks
     
    leeds1, Dec 30, 2004 IP
  2. makumba

    makumba Guest

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    #!/usr/bin/perl
    use strict;
    use warnings;
    
    use CGI;
    
    my $cgi = new CGI;
    
    my $affid = $cgi->param('affid');
    
    print "Location: http://affiliate.com/" . $affid . "\r\n\r\n";
    
    Code (markup):
    that should work...
     
    makumba, Jan 3, 2005 IP