/** * Sends a redirect header response and exits. Additionally the URL is * checked and if needed corrected to match the format required for a * Location redirect header. By default the HTTP status code sent is * a 'HTTP/1.1 303 See Other'. * * @param string $url The target URL to redirect to * @param string $httpStatus An optional HTTP status header. Default is 'HTTP/1.1 303 See Other' */ public static function redirect($url, $httpStatus = self::HTTP_STATUS_303) { self::setResponseCode($httpStatus); header('Location: ' . GeneralUtility::locationHeaderUrl($url)); die; }