Perl Script Redirect

CLOSED
Bids
20
Avg Bid (USD)
$39
Project Budget (USD)
$30 - $250

Project Description:
I need a script similar to this one but that can It can identify url paramaters and convert them to new parameters

In this example when typed google.com goes to yahoo.com

I need a script that when someone type
http://www.mydomain.com?prod=123&category=1

to redirect it to

http://www.mydomain.com?prod=789 category=5

I am using this script in my squid box
!/usr/bin/perl

$|=1;
while () {
@X = split;
$url = $X[0];

if ($url =~ /^http:\/\/google\.com/) {
print "302:https:\/\/yahoo\.com\n";
}

elsif ($url =~ /^http:\/\/www\.google\.com/) {
print "302:https:\/\/yahoo\.com\n";
}

elsif ($url =~ /^http:\/\/gmail\.com/) {
print "302:https:\/\/yahoo\.com\n";
}

else {
print "$url\n";
}
}

Skills required:
Perl
Hire asaenz
Project posted by:
asaenz United States
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the project creator or as one of the bidders to view bids.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.