diff --git a/mocha-php/src/mocha-php/include/BeforeLaunchEvent.inc.php b/mocha-php/src/mocha-php/include/BeforeLaunchEvent.inc.php index 6f4ca79..728354a 100644 --- a/mocha-php/src/mocha-php/include/BeforeLaunchEvent.inc.php +++ b/mocha-php/src/mocha-php/include/BeforeLaunchEvent.inc.php @@ -75,7 +75,12 @@ System::$BeforeLaunchEventHandler = function($path) if (count($path) == 0) { - System::Redirect("~/" . System::$Configuration["Application.DefaultTenant"], true); + $defaultTenantName = System::$Configuration["Application.DefaultTenant"]; + if (isset($_ENV["DEFAULT_TENANTNAME"])) + { + $defaultTenantName = $_ENV["DEFAULT_TENANTNAME"]; + } + System::Redirect("~/" . $defaultTenantName, true); return false; }