version 1.6, 2021/09/21 22:54:26
|
version 1.10, 2021/10/10 23:59:19
|
Line 85 sub handler {
|
Line 85 sub handler {
|
my $protocol = $Apache::lonnet::protocol{$lonhost}; |
my $protocol = $Apache::lonnet::protocol{$lonhost}; |
unless ($protocol eq 'https') { $protocol = 'http'; } |
unless ($protocol eq 'https') { $protocol = 'http'; } |
my $alias = &Apache::lonnet::use_proxy_alias($r,$lonhost); |
my $alias = &Apache::lonnet::use_proxy_alias($r,$lonhost); |
$hostname = $alias if ($alias ne ''); |
if (($alias ne '') && |
|
(&Apache::lonnet::alias_shibboleth($lonhost))) { |
|
$hostname = $alias; |
|
} |
my $dest = $protocol.'://'.$hostname.$target; |
my $dest = $protocol.'://'.$hostname.$target; |
$r->subprocess_env; |
if ($r->args ne '') { |
if ($ENV{'QUERY_STRING'} ne '') { |
$dest .= (($dest=~/\?/)?'&':'?').$r->args; |
$dest .= '?'.$ENV{'QUERY_STRING'}; |
|
} |
} |
unless (($uri eq '/adm/roles') || ($ENV{'QUERY_STRING'} =~ /origurl=/)) { |
unless (($uri eq '/adm/roles') || ($uri eq '/adm/logout')) { |
$dest.=(($dest=~/\?/)?'&':'?').'origurl='.$uri; |
if ($target eq '/adm/login') { |
|
unless ($ENV{'QUERY_STRING'} =~ /firsturl=/) { |
|
$dest.=(($dest=~/\?/)?'&':'?').'firsturl='.$uri; |
|
} |
|
} else { |
|
unless ($ENV{'QUERY_STRING'} =~ /origurl=/) { |
|
$dest.=(($dest=~/\?/)?'&':'?').'origurl='.$uri; |
|
} |
|
} |
} |
} |
$r->header_out(Location => $dest); |
$r->header_out(Location => $dest); |
return REDIRECT; |
return REDIRECT; |