I am having problems getting my login page to display and I can't figure out why. see post 691314 puzzled by pages, I posted the whole file and got flamed for it so now I am trying to be concise. I need to switch transforms based on product code here is original sub transform.
so I figured I would add a check for url and switch based on that, the switch worked if url is www.accountname.com but broke my accountcode.productname.com domains, there are 85 of them so this is a big problem for me. I have tried to debug as much as I knew how and have discovered it its accountcode.productname.com it will not output the servername with www urls it does, so I am not sure why or where its broke, can anyone provide suggestion on how to locate where the problem is?
I updated this post these comments are from when I had 9 miles of code in it as I don't really know what is causing the problem I figured I would post all the code guess I shouldn't have done that.
sub transform
{
my $trns = $Server->MapPath("Transforms/pLogin.xsl");
if ($Session->{'isAuthenticated'})
{
getMOTD();
SWITCH:
{
if ($Request->item("View")->item() eq "Resources")
{
$trns = $Server->MapPath("Transforms/tResources.xsl");
last SWITCH;
}
if ($Request->item("Tab")->item() eq "Support")
{
$trns = $Server->MapPath("Transforms/tSupport.xsl");
last SWITCH;
}
if ($Request->item("Tab")->item() eq "Help")
{
$trns = $Server->MapPath("Transforms/tHelp.xsl");
last SWITCH;
}
if ($Request->item("Tab")->item() eq "Training")
{
$trns = $Server->MapPath("Transforms/tTraining.xsl");
last SWITCH;
}
if ($Request->item("Tab")->item() eq "Trainers")
{
$trns = $Server->MapPath("Transforms/tTrainers.xsl");
last SWITCH;
}
if ($Request->item("Tab")->item() eq "Admin")
{
$trns = $Server->MapPath("Transforms/tAdmin.xsl");
last SWITCH;
}
$trns = $Server->MapPath("Transforms/pMain.xsl");
}
}
return $trns;
}