Help for this page

Select Code to Download


  1. or download this
    my %REDIRECTS = (
        'www.theirsite.com'  => [qw( our.server1 theirsite/ )], 
        'www.dummy.com'      => [qw( our.server2 dummy/)], 
        # And so on
    );
    
  2. or download this
    use URI;
    my $uri = URI->new($_);
    my $host = lc $uri->host; # Need to make sure the case is correct
    
  3. or download this
    $_ = join '/', @{ $REDIRECT{$host} };