on 11-02-2016 7:25 PM
There are a few variables affecting your urls, let's go step by step:
First of all there will be one specified by your storefront extension, which is the one right after the the ip or ip and port, and it is defined in the project properties file with these two properties:
tousstorefront.webroot=/yacceleratorstorefront
storefrontContextRoot=/yacceleratorstorefront
If you leave these two properties empty, for instance your given url would be this: http://electronics.local:9002/electronics/en/Open-Catalogue/Cameras/Hand-held-Camcorders/c/584 Then the rest of the properties are site specific, hence they can be configured from the site.impex of your storefront. The first thing would be the URL resolver, which are the regex associated to a site to know which urls should redirect to each site. In the example of the electronicsstore you can check its impex in import/coredata and you will find the following url mappings:
(?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$
(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$
(?i)^https?://api\.hybrisdev\.com(:[\d]+)?/rest/.*$
(?i)^https?://localhost(:[\d]+)?/rest/.*$
Being $siteuid "electronics". Anything matching these URLS will be considered as electronics site, so far so good.
Then the session comes in place, and whenever a site is matched via url (site is accessed) then the site is kept in the session and will remain there. Because of this, once the site is in the session this will have priority over the url matching, so whenever the storefront context root is matched and there is a site in the session this will be the one used with a matched page or a 404. In the case that you want to change from one site to another by default there is a property that can be added to url and will clean the session site, this property is ?clear=true. If you want to test if an url is being matched by a site, you can try to access it with that property at the end or just open it in a new incognito window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.