diff --git a/app/code/Magento/UrlRewrite/Controller/Router.php b/app/code/Magento/UrlRewrite/Controller/Router.php index c132eb45b8ec1..9f607189b93ef 100644 --- a/app/code/Magento/UrlRewrite/Controller/Router.php +++ b/app/code/Magento/UrlRewrite/Controller/Router.php @@ -129,7 +129,7 @@ protected function redirect($request, $url, $code) protected function getRewrite($requestPath, $storeId) { return $this->urlFinder->findOneByData([ - UrlRewrite::REQUEST_PATH => trim($requestPath, '/'), + UrlRewrite::REQUEST_PATH => ltrim($requestPath, '/'), UrlRewrite::STORE_ID => $storeId, ]); }