'temporary')), 'temporary'); break; case "/perm_redirect": it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent'); break; case "/redirect_loop": if ($_REQUEST['num'] > 0) it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1))); break; case "/nohost_redirect": header('Location: /redirect_target?type=nohost', true, 301); exit; case "/relative_redirect": header('Location: ../redirect_target?type=relative', true, 301); exit; case "/redirect_target": echo 'Testserver output after ' . $_REQUEST['type'] . ' redirect'; break; default: fwrite($stderr, "Unknown path '$_SERVER[PHP_SELF]' not handled!\n"); }