Not sure if this is what you need but how I do my forwarding is that all my domains point to the one url, a perl script then checks the HTTP_REFERER against a database file with all my domains in, if found, it then forwards on to the new url, with the destination address being masked.
For example, in the database file called domains.txt you would have:
domain1.co.uk|www.sedoparking.com/domain1.co.uk
domain2.co.uk|www.ndparking.com/domain2.co.uk
etc...
In your forwarding script i.e. www.yourdomain.co.uk/forwarding.cgi you would have at least the following code:
my $referer = $ENV{HTTP_REFERER} || '';
open (DOMAIN_DATABASE, "< domains.txt");
my @DOMAIN_ARRAY = <DOMAIN_DATABASE>;
foreach my $row (@DOMAIN_ARRAY) {
chomp($row);
my ($domain, $forward) = split(/\|/, $row);
if ($referer =~ m/$domain/) { # Domain matched
print "Location: $forward\n\n"; # Forward to new location
exit(0); # Exit program
}
}
close (DOMAIN_DATABASE);
Then all you need to do is update the domains.txt file with whatever forwarding url as you choose. Simple really.