diff --git a/CHANGELOG.md b/CHANGELOG.md index 10d38ffe2..9bbfbd4d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * Fixed `UserIndex` not implementing `UserCollectionInterface` * Fixed missing `onAdminAfterDelete` event call in `Flex Pages` * Fixed system templates not getting scanned [#3296](https://github.com/getgrav/grav/issues/3296) + * Fixed incorrect routing if url path looks like a domain name [#2184](https://github.com/getgrav/grav/issues/2184) # v1.7.9 ## 03/19/2021 diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index f7046083d..d0d6ad5e0 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -205,8 +205,8 @@ class Uri // set active language $uri = $language->setActiveFromUri($uri); - // split the URL and params - $bits = parse_url($uri); + // split the URL and params (and make sure that the path isn't seen as domain) + $bits = parse_url('http://domain.com' . $uri); //process fragment if (isset($bits['fragment'])) {