$code = $this->error->getCode(); $app = & JFactory::getApplication(); if ( $code == 404 ) { $app->redirect($this->baseurl); } if ( $code == 403 ) { $app->redirect( JRoute::_('index.php?option=com_users&view=login') ); }