$salesChannel =
$this->
findSalesChannel($request);
if ($salesChannel === null
) { // this class and therefore the "isSalesChannelRequired" method is currently not extendable
// which can cause problems when adding custom paths
throw new SalesChannelMappingException($request->
getUri());
} $absoluteBaseUrl =
$this->
getSchemeAndHttpHost($request) .
$request->
getBaseUrl();
$baseUrl =
str_replace($absoluteBaseUrl, '',
$salesChannel['url'
]);
$resolved =
$this->
resolveSeoUrl( $request,
$baseUrl,
$salesChannel['languageId'
],
$salesChannel['salesChannelId'
] );
$currentRequestUri =
$request->
getRequestUri();
/**
* - Remove "virtual" suffix of domain mapping shopware.de/de
* - To get only the host shopware.de as real request uri shopware.de/
* - Resolve remaining seo url and get the real path info shopware.de/outdoor => shopware.de/navigation/{id}
*
* Possible domains
*
* same host, different "virtual" suffix
* http://shopware.de/de
* http://shopware.de/en
* http://shopware.de/fr
*
* same host, different location
* http://shopware.fr
* http://shopware.com
* http://shopware.de
*
* complete different host and location
* http://color.com
* http://farben.de
* http://couleurs.fr
*
* installation in sub directory
* http://localhost/development/public/de
* http://localhost/development/public/en
* http://localhost/development/public/fr
*
* installation with port
* http://localhost:8080
* http://localhost:8080/en
* http://localhost:8080/fr
*/