From e211cee8fd350085b8e7c1fdab94945fab15265c Mon Sep 17 00:00:00 2001 From: Daniel Remeseiro Date: Wed, 16 May 2012 11:50:55 +0200 Subject: [PATCH] added 301 redir codes to ad not found view --- application/controllers/AdController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/controllers/AdController.php b/application/controllers/AdController.php index 930b01e..adf54fa 100644 --- a/application/controllers/AdController.php +++ b/application/controllers/AdController.php @@ -48,7 +48,7 @@ public function listAction() //dont accept other values than give/want $this->getResponse()->setHttpResponseCode(404); $this->_helper->_flashMessenger->addMessage($this->view->translate('this url does not exist')); - $this->_redirect('/' . $this->lang . '/woeid/' . $this->location . '/give'); + $this->_redirect('/' . $this->lang . '/woeid/' . $this->location . '/give', array('code'=>301)); } @@ -95,7 +95,7 @@ public function listAction() //TODO , this sucks, do a better way to not show invalid woeids or null if ((empty($woeid)) || ($woeid < 10) || ($woeid == 29370606)) { //29370606 espaƱa town $this->_helper->_flashMessenger->addMessage($this->view->translate('This location is not a valid town. Please, try again.')); - $this->_redirect('/' . $this->lang . '/location/change'); + $this->_redirect('/' . $this->lang . '/location/change',array('code'=>301)); } //set the location name reg var from the woeid helper @@ -138,7 +138,7 @@ public function listallAction() else { //dont accept other values than give/want $this->_helper->_flashMessenger->addMessage($this->view->translate('this url does not exist')); - $this->_redirect('/' . $this->lang . '/ad/listall/ad_type/give'); + $this->_redirect('/' . $this->lang . '/ad/listall/ad_type/give', array('code'=>301)); } @@ -322,7 +322,7 @@ public function showAction() $urlChunks = str_replace('.html', '', $urlChunks); $urlChunks = str_replace('-', ' ', $urlChunks); //redir to search - $this->_redirect('/' . $this->lang . '/search/?q=' . $urlChunks[sizeof($urlChunks) - 1] . '&ad_type=1&woeid=' . $this->location); + $this->_redirect('/' . $this->lang . '/search/?q=' . $urlChunks[sizeof($urlChunks) - 1] . '&ad_type=1&woeid=' . $this->location , array('code'=>301)); } }