Closed

Perl Script Redirect

This project received 20 bids from talented freelancers with an average bid price of $39 USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
$30 - $250 USD
Total Bids
20
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 [url removed, login to view] goes to [url removed, login to view]

I need a script that when someone type
[url removed, login to view];category=1

to redirect it to

[url removed, login to view] 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";
}
}

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online