From 17e85299412b39cfd84b277414afdec33a7c4b05 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 12 Mar 2014 17:21:37 +0100 Subject: [PATCH] Bug 7844 - plack should redirect / to correct page This is followup which include redirect for home pages of OPAC and Intranet --- misc/plack/koha.psgi | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/misc/plack/koha.psgi b/misc/plack/koha.psgi index 904cc72..fd8b8a8 100644 --- a/misc/plack/koha.psgi +++ b/misc/plack/koha.psgi @@ -53,6 +53,9 @@ sub watch_for_size { my $CGI_ROOT = $ENV{INTRANET} ? $ENV{INTRANETDIR} : $ENV{OPACDIR}; warn "# using Koha ", $ENV{INTRANET} ? 'intranet' : 'OPAC', " CGI from $CGI_ROOT\n"; my $app=Plack::App::CGIBin->new(root => $CGI_ROOT); +my $home = sub { + return [ 302, [ Location => '/cgi-bin/koha/' . ( $ENV{INTRANET} ? 'mainpage.pl' : 'opac-main.pl' ) ] ]; +}; builder { @@ -78,6 +81,7 @@ builder { root => "$ENV{INTRANETDIR}/koha-tmpl/"; mount "/cgi-bin/koha" => $app; + mount "/" => $home; }; -- 1.7.2.5