public function index(HTTPRequest $request)
    {
        /** @var RedirectorPage $page */
        $page = $this->data();
        if (!$this->getResponse()->isFinished() && $link = $page->redirectionLink()) {
            $this->redirect($link, 301);
        }
        return parent::handleAction($request, 'handleIndex');
    }
public function index(HTTPRequest $request)
    {
        /** @var RedirectorPage $page */
        $page = $this->data();
        if (!$this->getResponse()->isFinished() && $link = $page->redirectionLink()) {
            $this->redirect($link, 301);
        }
        return parent::handleAction($request, 'handleIndex');
    }
public function index ( HTTPRequest $ request ) { /** @var RedirectorPage $page */ $ page = $ this -> data ( ) ; if ( ! $ this -> getResponse ( ) -> isFinished ( ) && $ link = $ page -> redirectionLink ( ) ) { $ this -> redirect ( $ link , 301 ) ; } return parent :: handleAction ( $ request , 'handleIndex' ) ; }
Check we don't already have a redirect code set

@param  HTTPRequest $request
@return \SilverStripe\Control\HTTPResponse
Check we don t already have a redirect code set