[# [- use Data::Dumper ; -] [+ Dumper (\%ENV, \%fdat, \%udat) +] #] [- $url = $ENV{HTTP_HOST}; if ($url =~ /^(.*)livinghomepage2?\.com$/) { # print OUT "$ENV{HTTP_HOST}"; # exit; $prefix = lc($1); if ($prefix eq "" or $prefix eq "www.") { $http_headers_out{Location} = 'http://www.livinghomepage.com/about/index.htm'; exit; } elsif ($prefix =~ /(\S+)\./) { $pos_site = $1; $http_headers_out{Location}="./edu/index.htm?site=$pos_site"; exit; } else { $http_headers_out{Location} = 'http://www.livinghomepage.com/about/index.htm'; exit; } } elsif ($url =~ /class-homepage\.com$/ or $url =~ /class-website\.com$/ or $url =~ /teachers-homepage\.com$/ or $url =~ /teachers-website\.com$/) { $http_headers_out{Location} = "./about/index.htm"; } else { $http_headers_out{Location} = 'http://www.livinghomepage.com/about/index.htm'; exit; } -]