diff --git a/app/code/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php b/app/code/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php index 873eed4466715..6728dd69d4bcc 100644 --- a/app/code/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php +++ b/app/code/Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php @@ -77,7 +77,12 @@ public function switch(StoreInterface $fromStore, StoreInterface $targetStore, s $targetUrl .= $currentRewrite->getRequestPath(); } } else { - $existingRewrite = $this->urlFinder->findOneByData([UrlRewrite::REQUEST_PATH => $urlPath]); + $existingRewrite = $this->urlFinder->findOneByData( + [ + UrlRewrite::REQUEST_PATH => $urlPath, + UrlRewrite::STORE_ID => $oldStoreId, + ] + ); $currentRewrite = $this->urlFinder->findOneByData( [ UrlRewrite::REQUEST_PATH => $urlPath,