Skip to content

Commit

Permalink
[BUGFIX] Solved issue with api incorrect redirect because it requires…
Browse files Browse the repository at this point in the history
… the original storecode
  • Loading branch information
lewisvoncken committed Apr 29, 2020
1 parent 5762272 commit b2d100f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.1.1 (2020-04-29)

[View Release]([email protected]:experius/Magento2-Module-Multiple-Website-Store-Code-Url.git/commits/tag/2.1.1)

* [BUGFIX] Solved issue with api incorrect redirect because it requires the original storecode *(Lewis Voncken)*


## 2.1.0 (2020-04-24)

[View Release]([email protected]:experius/Magento2-Module-Multiple-Website-Store-Code-Url.git/commits/tag/2.1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function afterGetValidStoreCode(
return $result;
}

if ($result && strpos($request->getRequestUri(), "/{$websiteCode}_") !== false) {
if ($result && strpos($request->getRequestUri(), "/{$websiteCode}_") === 0) {
$requestUri = str_replace("/{$websiteCode}_", "", $request->getRequestUri());
$response = $this->responseFactory->create();
$response->setRedirect($request->getDistroBaseUrl() . $requestUri, 301);
Expand Down

0 comments on commit b2d100f

Please sign in to comment.