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?

2 Answers 2

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

1
  • This is the correct solution. Thanks for the help! Commented May 27, 2016 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.

2
  • 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. Commented Aug 16, 2016 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. Commented Aug 17, 2016 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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