From 2fefb326a586e95a8843fffd52a0d6822b1df6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Wittmann=20=E2=80=93=20Gestaltung=20=26=20Entwicklu?= =?UTF-8?q?ng?= Date: Thu, 24 Nov 2022 13:22:16 +0100 Subject: [PATCH] bugfix single domain redirect I came across of this problem with the following domains: domain | context ----|---- jens.de | web (default) jens.de/de/ | web jens.eu | en jens.eu/en/ | en The Domain jens.eu redirects to the default `web` context, but have to redirect to `en` in this situation. So i think the problem is a missing match. For my project this solution solved it. --- .../components/xrouting/elements/plugins/xrouting.plugin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/components/xrouting/elements/plugins/xrouting.plugin.php b/core/components/xrouting/elements/plugins/xrouting.plugin.php index 2fff86f..2d2bf5e 100755 --- a/core/components/xrouting/elements/plugins/xrouting.plugin.php +++ b/core/components/xrouting/elements/plugins/xrouting.plugin.php @@ -118,6 +118,11 @@ } } + // find matching hosts without ckey + if (!empty($matched_contexts) && empty($matches)) { + $matches[] = $matched_contexts[0]; + } + // modify request for the matched context if (!empty($matches)) {