what I am after here is capturing what url they are requesting and if it matches then supplying a login page for that particular account, since I don't want to do this 115 times, I was hoping to find a way to match it without iterating over all these possibles, I am not sure if module test:: will run on perl 5.6.1 and am very hesitant to add anything to the perl install as this is a production box.
excellent point about the \t I forgot about that.
I can't figure out how to get it to even echo what the url is if I type it manually can someone please tell me what I am doing wrong. there may be more than one way to do it, but I would like to find the one that works the good news is I already have discovered several that don't
sub transform
{
if (!$Session->{'isAuthenticated'})
{
#Following statement checks if site is www prefix if so it check
+s tempo or mlxhelp and uses appropriate stylesheet
#for each this only checks www. prefix need another to check the
+ rest of the potential matches
if ($Request->ServerVariables("SERVER_NAME")->item()=~/(\w+)\.co
+m/)
{
$domain = $1;
#$Response->write("This is the domain");
if ($1 eq 'tempohelp')
{
my $trns= $Server->MapPath("Transforms/tpLogin.xsl");
return $trns;
}
if ($1 eq 'mlxhelp')
{
$Response->write("This is the domain $1");
my $trns=$Server->MapPath("Transforms/pLogin.xsl");
return $trns;
}
}
#closes wwww prefix check..
if (!(substr($Request->ServerVariables("SERVER_NAME")->item(),0,3)
+ eq "www") && !(substr($Request->ServerVariables("SERVER_NAME")->item
+(),0,3) eq "mlx") && !(lc($Request->ServerVariables("SERVER_NAME")->i
+tem()) eq "localhost"))
{
$Request->ServerVariables("SERVER_NAME")->item() =~ /([\w]*)\./;
$str .= ".$1.";
$Response->write("this is $str");
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.