diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 2aea8dd97..7462124d8 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -467,7 +467,15 @@ class FormController extends ControllerBehavior $redirectUrl = RouterHelper::parseValues($model, array_keys($model->getAttributes()), $redirectUrl); } - return ($redirectUrl) ? Backend::redirect($redirectUrl) : null; + if (starts_with($redirectUrl, 'http://') || starts_with($redirectUrl, 'https://')) { + // Process absolute redirects + $redirect = Redirect::to($redirectUrl); + } else { + // Process relative redirects + $redirect = ($redirectUrl) ? Backend::redirect($redirectUrl) : null; + } + + return $redirect; } /**