my $in = "/Products/bt-(.*?).aspx"; my $out = "/s/Products/$1"; $ENV{REQUEST_URI} =~ s#$in#$out#i;