--- loncom/auth/loncacc.pm 2003/02/03 18:03:52 1.25 +++ loncom/auth/loncacc.pm 2003/04/03 21:32:23 1.26 @@ -2,7 +2,7 @@ # Cookie Based Access Handler for Construction Area # (lonacc: 5/21/99,5/22,5/29,5/31 Gerd Kortemeyer) # -# $Id: loncacc.pm,v 1.25 2003/02/03 18:03:52 harris41 Exp $ +# $Id: loncacc.pm,v 1.26 2003/04/03 21:32:23 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,7 +38,7 @@ package Apache::loncacc; use strict; -use Apache::Constants qw(:common :http :methods); +use Apache::Constants qw(:common :http :methods REDIRECT); use Apache::File; use CGI::Cookie(); use Fcntl qw(:flock); @@ -99,6 +99,15 @@ sub handler { $r->log_reason("Unauthorized $requrl", $r->filename); return HTTP_NOT_ACCEPTABLE; } +# Construction space needs Remote to work + if ($ENV{'environment.remote'} eq 'off') { + $r->content_type('text/html'); + $r->header_out(Location => + 'http://'.$r->server->server_hostname. + '/adm/remote?action=launch&url='. + &Apache::lonnet::escape($requrl)); + return REDIRECT; + } # -------------------------------------------------------- Load POST parameters