public function redirect($queryParams = [],  $statusCode = 302) {

		$request		= Request::createFromGlobals();
		$application	= Application::getInstance();

		$urlSegments = [
			$request->getSchemeAndHttpHost()
		];

		if($application->getRouter()->getServerSideRewrite()) {
			if(($scriptName = basename($request->getScriptName(), '.php')) !== 'index') {
				$urlSegments[] = $scriptName;
			}
		}
		else {
			$urlSegments[] = trim($request->getScriptName(), '/');
		}

		if(count($queryParams)) {
			$query = '?' . http_build_query($queryParams);
		}

		else {
			$query = '';
		}

		return new RedirectResponse(implode('/', $urlSegments) . '/' . $this->redirect . $query, $statusCode);

	}