9

I have installed DXA 1.4 on Web8 (CU1). Its all working fine, and as part of development I added a bunch of baseUrls for my web app: http://localhost:1234, http://somedomain.local, http://otherdomain:1234 and so on) using Set-TtmWebsite powershell scriptlet so I can run the site from local dev env, and also access the site running on a central web server with a variety of domains and ports.

I noticed that the dynamic links resolved are not relative; they have the a domain and port prefixed on them. This is causing problems as the domain/port is always the same; http://localhost:1234, no matter what domain/port is in the URL request, this means the links are broken when I request the site from http://otherdomain:1234 (as they all point to localhost)

I gathered from the docs you can override TTM behaviour by setting OverrideDiscoveryService to true in cd_link_conf.xml and thus have all resolved links relative to the site root, rather than with a domain/port added.

I tried this but with no joy - the . In fact, the domain/port prefix used actually changed from localhost:1234 to otherdomain:1234. After making the change I ran the discover-registration.jar update and restarted the discovery, content and web applications.

So the question is how does TTM determine the domain/port used for linking, and how can I change this (either in topology manager, or how do I get it to use the configuration from cd_link_conf.xml)

Update: After restarting everything again it works, so I obviously missed something. However the question remains about if you allow TTM to configure linking, how does it work out which domain/port to use?

  • 2
    BTW: Consider installing DXA 1.5; it's Bigger, Better and Faster. ;-) – Rick Pannekoek Jul 13 '16 at 17:37
  • I needed to restart the application pool for the DXA website in order for the Content service config change to kick in. – Jan H Dec 7 '16 at 13:01
5

If your website has multiple base URLs, you should indeed configure CD Linking to use relative URLs (as a matter of fact, I don't see why you would ever want to use absolute URLs).

Using absolute URLs with multiple website base URLs just won't work; CD Linking doesn't know your current context and hence can only select an arbitrary base URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.