<?php
-$path = $_SERVER['PATH_INFO'] ?? '/';
-header('Location: https://toolbox.fluidbook.com' . $path, true, 301);
+$path = trim($_SERVER['PATH_INFO'] ?? '/', '/');
+$d = 'toolbox.fluidbook.com';
+$params = $_GET;
+$u = $path;
+
+switch ($path) {
+ case 'maintenance/refreshUsersTree':
+ $d = 'extranet.cubedesigners.com';
+ break;
+ default:
+ break;
+}
+
+$q = '';
+foreach ($_GET as $k => $v) {
+ $q .= (strlen($q) === 0 ? '?' : '&') . $k . '=' . urlencode($v);
+}
+header('Location: https://' . $d . '/' . $u . $q, true, 308);