public function handleException($exception) { $redirectModel = SeoRedirects::find()->where(['old_url' => Yii::$app->request->url])->asArray()->one(); if (!empty($redirectModel)) { $redirectStatus = $redirectModel['status'] == 302 ? 302 : 301; header("Location: " . $redirectModel['new_url'], true, $redirectStatus); exit; } parent::handleException($exception); }
public function handleException($exception) { $this->captureException($exception); parent::handleException($exception); }
/** * Handle Exception * @param \Exception $exception */ public function handleException($exception) { $this->reportException($exception); parent::handleException($exception); }