Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

weird url problems

by grashoper (Monk)
on Jun 12, 2008 at 08:33 UTC ( [id://691608]=perlquestion: print w/replies, xml ) Need Help??

grashoper has asked for the wisdom of the Perl Monks concerning the following question:

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; }

Replies are listed 'Best First'.
Re: weird url problems
by ikegami (Patriarch) on Jun 12, 2008 at 09:16 UTC

    Do you really think 7 pages of CSS has any bearing on your problem? And all those functions?

    Did you even say what your problem is? If so, I didn't understand.

Re: weird url problems
by igelkott (Priest) on Jun 12, 2008 at 11:14 UTC
    with a standard www it works, with an account specific url it does not

    Seems like it could be permission problem. You may not have permission to run cgi scripts in your folder or under your account.

    I didn't read past the introduction and I doubt that many will. Besides making a shorter post for our sake, trying to run short, simple tests should shine light on the real problem buried in all this code. If you don't mind the advice, this is a good technique in programming and, IMHO, all problem solving.

Re: weird url problems
by Anonymous Monk on Jun 12, 2008 at 08:59 UTC
Re: weird url problems
by blazar (Canon) on Jun 14, 2008 at 08:53 UTC
    I am having problems getting my login page to display and I can't figure out why. see post 691314 puzzled by pages,

    I personally believe that you've been hanging around for quite a while now, but every now and again I happen to stumble upon some poorly phrased and formatted posts of yours like this one. In particular, by giving the node id of some post you're referring to, along with the (unnecessary and unquoted) title of it, you're requiring people who are reading you to open a new tab or window and compose the appropriate url themselves. This is unfair, given that with a few more (or even less) keystrokes on your part you can create a suitable hyperlink to that post. In particular, you can use e.g. the following shortcuts:

    • [691314]
    • [id://691314]
    • [id://691314|a prior post of mine]
    which render respectively like:
    --
    If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://691608]
Approved by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found