private function getRedirectResponse(ServerRequestInterface $request, UriInterface $uri, ResponseInterface $response)
    {
        //Fix the basePath
        $generator = BasePath::getGenerator($request);

        if ($generator !== null) {
            $uri = $uri->withPath($generator($uri->getPath()));
        }

        return $response
            ->withStatus($this->redirectStatus)
            ->withHeader('Location', (string) $uri);
    }
private function getRedirectResponse(ServerRequestInterface $request, UriInterface $uri, ResponseInterface $response)
    {
        //Fix the basePath
        $generator = BasePath::getGenerator($request);

        if ($generator !== null) {
            $uri = $uri->withPath($generator($uri->getPath()));
        }

        return $response
            ->withStatus($this->redirectStatus)
            ->withHeader('Location', (string) $uri);
    }
private function getRedirectResponse ( ServerRequestInterface $ request , UriInterface $ uri , ResponseInterface $ response ) { //Fix the basePath $ generator = BasePath :: getGenerator ( $ request ) ; if ( $ generator !== null ) { $ uri = $ uri -> withPath ( $ generator ( $ uri -> getPath ( ) ) ) ; } return $ response -> withStatus ( $ this -> redirectStatus ) -> withHeader ( 'Location' , ( string ) $ uri ) ; }
Returns a redirect response.

@param ServerRequestInterface $request
@param UriInterface           $uri
@param ResponseInterface      $response

@return ResponseInterface
Returns a redirect response .