Skip to content

Commit

Permalink
fix: issue with redirect where source is a siteaccess with en URI match
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian ALEXANDRE committed Jul 26, 2024
1 parent 4b8bf86 commit b864fa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bundle/Core/UrlWildcardRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function matchRequest(Request $request): array
{
try {
// Manage full url : http://host.com/uri
$requestedPath = $request->attributes->get('semanticPathinfo', $request->getPathInfo());
$requestedPath = $request->getPathInfo();
$requestUriFull = $request->getSchemeAndHttpHost().$requestedPath;
$urlWildcard = $this->wildcardService->translate($requestUriFull);
} catch (Exception $e) {
Expand All @@ -51,6 +51,7 @@ public function matchRequest(Request $request): array

if (0 === strpos($urlWildcard->uri, 'http://') || 'https://' === substr($urlWildcard->uri, 0, 8)) {
$params += ['semanticPathinfo' => trim($urlWildcard->uri, '/')];
$params += ['prependSiteaccessOnRedirect' => false];
} else {
$params += ['semanticPathinfo' => '/'.trim($urlWildcard->uri, '/')];
}
Expand Down

0 comments on commit b864fa1

Please sign in to comment.