Line 13 in /container/application/public/mysite/code/Web/ArtworkRedirectionController.php
4 class ArtworkRedirectionController extends \PageController { 5 private static $allowed_actions = [ 6 'index' 7 ]; 8 9 public function index() { 10 $title = $this->getRequest()->param('Title'); 11 12 $artwork = CollectionSinglePage::get()->filter(['URLSegment:StartsWith:nocase' => $title])->first(); 13 if(!$artwork->isEmpty() && $title !== 'untitled') { 14 $this->redirect($artwork->Link(), 301); 15 } else { 16 $this->redirect('/seeing/collection/', 301); 17 } 18 } 19 }