0

I am having an issue in Sitecore 9.0.2 that cross sites links are not resolving properly. The link is resolved as a context site link and when I click on that link it gives me 404 so anyone has any idea on this?

I have two sites -

  1. corporate
  2. corporate.jp.local

When I linked any item(Home/test/test1) of Site 1(corporate) in Site 2(corporate.jp.local). It generates the URL with the second site.

Example: corporate.jp.local/test/test1

Already tried below solutions but they've not worked:

Sitedefinition structure

<site name="japan" patch:before="site[@name='website']"
            hostName="corporate.jp.local"
            targetHostName="corporate.jp.local"
            language="ja-JP"
            enableFallback="true"
            virtualFolder="/"
            physicalFolder="/"
            rootPath="/sitecore/content/jp"
            startItem="/Home"
            database="web"
            domain="extranet"
            allowDebug="true"
            cacheHtml="true"
            htmlCacheSize="10MB"
            enablePreview="true"
            enableWebEdit="true"
            enableDebugger="true"
            disableClientData="false" />


    <site name="English" patch:before="site[@name='website']"
      hostName="corporate"
      targetHostName="corporate"
      language="en"
      virtualFolder="/"
      physicalFolder="/"
      rootPath="/sitecore/content/en"
      startItem="/home"
      database="web"
      domain="extranet"
      allowDebug="true"
      cacheHtml="true"
      htmlCacheSize="100MB"
      enablePreview="true"
      enableWebEdit="true"
      enableDebugger="true"
      disableClientData="false" />

Tree structure

japan

  • Home
    • test
      • test1

test

  • Home
    • test
      • test1
  • Do you have alwaysIncludeServerUrl set to "true" in your LinkManager configurations? – Ahmed Okour Oct 24 '18 at 13:59
  • Yes, It is set to true – Ravindra S. Rathore Oct 24 '18 at 14:08
  • do you have targetHostName in your site definitions? – Marek Musielak Oct 24 '18 at 14:12
  • Yes, targetHostName it there. – Ravindra S. Rathore Oct 24 '18 at 14:15
  • Can you include your sites definition and tree structure in your question? – Marek Musielak Oct 24 '18 at 14:34