Closed

Perl Script Redirect

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";

}

}

Skills: Perl

See more: 123 print, squid, google script gmail, script box, perl split, need squid, squid script, bin split, redirect url, redirect url using, perl print, perl gmail, redirect script google, script gmail, 123, url redirect, perl url parameters, gmail url, convert redirect, category script, url redirect script, perl convert, google url parameters example, convert script perl, script perl google

About the Employer:
( 10 reviews ) Los Alamos, United States

Project ID: #907712

20 freelancers are bidding on average $39 for this job

Mindon

ok, let me make it for you please. thanks.

$30 USD in 1 day
(54 Reviews)
6.1
$30 USD in 0 days
(26 Reviews)
6.1
gangabass

I can do this job for you. See PM for details.

$30 USD in 0 days
(144 Reviews)
5.9
garygoog

Hi ,Please check PM.

$30 USD in 10 days
(24 Reviews)
5.7
pivanush

you may do it by re replacement, use this few lines. $prod = '789'; $category = '5'; $ARGV[0] =~ s/prod\=\d+/prod\=$prod/i; $ARGV[0] =~ s/category\=\d+/category\=$category/i; Please, contact me, you'll get i More

$30 USD in 1 day
(7 Reviews)
4.1
ChinaCoCo

Please check PMB

$30 USD in 3 days
(3 Reviews)
3.8
TheCammelCoder

Hi there, simply easy request. Please check PM for further detail. Thanks

$30 USD in 1 day
(3 Reviews)
3.2
amsak

Placing bid

$30 USD in 7 days
(5 Reviews)
3.0
PavelZhytom

I will do this for you with please.

$30 USD in 0 days
(1 Review)
1.4
PrimeMindsLogics

Please check PM.

$30 USD in 1 day
(6 Reviews)
1.0
eniac111

check my pm :)

$30 USD in 1 day
(0 Reviews)
0.0
deatul

Dear, I will help you out with this script completely

$30 USD in 1 day
(1 Review)
0.0
apotdar

Hi, I can do this in less than 2 hours. Please provide me with details on exactly what you need. This is based on the assumption that you exactly need what you have in your requirements. If you need more than w More

$30 USD in 1 day
(0 Reviews)
0.0
aloke1982

I hope that I can give you the best possible solution for this . Thanks

$30 USD in 1 day
(0 Reviews)
0.0
diegows

I already did things like this. My last two projects were related to Squid. I prefer to do the script in Python, but perl is ok for me too. Check PM.

$200 USD in 1 day
(0 Reviews)
0.0
demigraff

This is a simple enough project. I have many years experience with perl, including complex regular expressions, and I can do this easily given a list of what must be changed in the URL.

$30 USD in 2 days
(0 Reviews)
0.0
shensche

have done a lot of work in Perl before

$30 USD in 1 day
(0 Reviews)
0.0
libvenus

Hi, I can very well do this. Please check PM for details... Thanks

$30 USD in 1 day
(0 Reviews)
0.0
Ivani4

It's a simple script. I can develop it in a hour.

$30 USD in 0 days
(0 Reviews)
0.0
hmpakhare

Its very interesting and enjoyable.I'll like to this work.

$30 USD in 1 day
(0 Reviews)
0.0