8

When running the Add-TtmMapping PowerShell script for a Publication with a Publication URL property of /en to a website with a URL defined similar to http://example.com I am getting this error message:

The server-relative URL '' of the Mapping does not match the Publication URL property

But I don't see where I can define this server-relative URL in the Add-TtmMapping script, where can I specify this server-relative URL?

7

Server-relative URL is a combination of WebApplication ContextUrl and Mapping RelativeUrl properties, so if you use default root web application for you mapping you can specify

 -RelativeUrl en

in Add-TtmMapping cmdlet

| improve this answer | |
  • This is the correct solution. Thanks for the help! – Mark Williams May 27 '16 at 14:54
2

Another solution is to make your Publication URL (in Contebt Manager) "context-relative" (read: empty).

That is the preferred approach where the first part of the URL is managed purely in Topology Manager, instead of overlapping with the Publication URL in CM.

| improve this answer | |
  • What you see if you do Get-TtmMapping is the primary mapped URL, but if your website has multiple base URLs, they can in principle all be used to do URL - Publication mapping. If you use the "View on site" feature in the CME, it will always use the primary mapped URL, though. – Rick Pannekoek Aug 16 '16 at 18:00
  • Yeah.. anyways just fixed it by setting up publication path in Publication settings and mapping the 2nd Url as the website location and it worked. – Vikas Kumar Aug 17 '16 at 12:32

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.