--- loncom/auth/lonlogout.pm 2011/10/22 23:53:46 1.43 +++ loncom/auth/lonlogout.pm 2012/02/13 16:59:24 1.45 @@ -1,7 +1,7 @@ # The LearningOnline Network # Logout Handler # -# $Id: lonlogout.pm,v 1.43 2011/10/22 23:53:46 raeburn Exp $ +# $Id: lonlogout.pm,v 1.45 2012/02/13 16:59:24 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -117,11 +117,21 @@ sub handler { $login_url = $domdefaults{'portal_def'}; } else { my $checkloginvia = 1; - my ($lonhost,$server,$path) = + my ($lonhost,$server,$path,$isredirect) = &Apache::lonnet::choose_server($domain,$checkloginvia); if ($server && $lonhost) { $login_url = $Apache::lonnet::protocol{$lonhost}. '://'.$server.$path; + if (($path eq '') && (!$isredirect)) { + my $serverhomeID = + &Apache::lonnet::get_server_homeID($server); + my $serverhomedom = + &Apache::lonnet::host_domain($serverhomeID); + if ($serverhomedom ne $domain) { + $path = '/adm/login'; + $login_url .= $path; + } + } if ($path eq '/adm/login' && $domain ne '') { $login_url .= '?domain='.$domain; }
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.