diff --git a/Classes/Controller/DocumentsController.php b/Classes/Controller/DocumentsController.php index 4b32869..d788897 100644 --- a/Classes/Controller/DocumentsController.php +++ b/Classes/Controller/DocumentsController.php @@ -383,7 +383,9 @@ private function findPossibleRedirect(string $path, string $host): ?array } return [ - 'targetPath' => '/' . ltrim($redirect->getTargetUriPath(), '/'), + 'targetPath' => parse_url($redirect->getTargetUriPath(), PHP_URL_SCHEME) === null ? + '/' . ltrim($redirect->getTargetUriPath(), '/') + : $redirect->getTargetUriPath(), 'statusCode' => $redirect->getStatusCode(), ]; }