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);

	}
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);

	}
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 ) ; }
redirect using configured redirect information
if route has no redirect set, redirect will lead to "start page"

@param array $queryParams
@param int $statusCode
@return RedirectResponse
@throws \vxPHP\Application\Exception\ApplicationException
redirect using configured redirect information if route has no redirect set redirect will lead to start page