cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help with setting url patterns for a multi site

Former Member
0 Likes
406

Hi, I have created my content catalog, product catalog and store initialdata=>coredata=>contentCatalogs initialdata=>coredata=>productCatalogs initialdata=>coredata=>stores I have created 2 sites in the impex files.

In the first site i have set my URLS as using the following INSERT_UPDATE CMSSite;uid[unique=true];theme(code);channel(code);stores(uid);contentCatalogs(id);defaultCatalog(id);defaultLanguage(isoCode);siteMapConfig(&siteMapConfigId);urlPatterns;active;previewURL;startingPage(uid,$contentCV);urlEncodingAttributes;defaultPromotionGroup(Identifier)[default=$promoGrp];brandName

I use it twice with the My URL patterns for Site1 ;site1;blue;B2C;site1;$contentCatalog;$productCatalog;$defaultLanguage;$storeUidSiteMapConfig; (?i)^https?://[^/]+(/[^?])?\?(.\&)?(site=site1)(|\&.)$, (?i)^https?://site1.[^/]+(|/.|\?.)$, (?i)^https?://api.site1dev.com(:[\d]+)?/rest/.$, (?i)^https?://localhost(:[\d]+)?/rest/.$, (?i)^https?://[^/]/site1/((?![\?\&]site=).), (?i)^https?://shoppp.site1labs.co.za.[^/]+(|/.|\?.)$, (?i)^https?://shoppp.site1labs.co.za, (?i)^https?://shop.site1labs.co.za, (?i)^https?://shop.site1.co.za; true;$storefrontContextRoot/?site=$siteUid;homepage;storefront,language;;site1

Site2 ;site1;blue;B2C;site2;$contentCatalog;$productCatalog;$defaultLanguage;$storeUidSiteMapConfig; (?i)^https?://[^/]+(/[^?])?\?(.\&)?(site=site2)(|\&.)$, (?i)^https?://site2.[^/]+(|/.|\?.)$, (?i)^https?://api.site2dev.com(:[\d]+)?/rest/.$, (?i)^https?://localhost(:[\d]+)?/rest/.$, (?i)^https?://[^/]/site2/((?![\?\&]site=).), (?i)^https?://shoppp.site2labs.co.za.[^/]+(|/.|\?.)$, (?i)^https?://shoppp.site2labs.co.za, (?i)^https?://shop.site2labs.co.za, (?i)^https?://shop.site2.co.za; true;$storefrontContextRoot/?site=$siteUid;homepage;storefront,language;;site2

If I run https://localhost:9002/site1/en/login I get what I expect

If I run https://localhost:9002/site2/en/login I get a 404 and all the urls on the 404 page point to https://localhost:9002/site1

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

You are using site Id as site1 for both website. Change that and try once again. Hope it will work.

Answers (0)