When users paste URLs into the web content tool they typically are fully qualified (eg https://server.edu/some/url/to/content). However if we know they point to the current server we can strip off the server portion and make them relative. This has the following advantages:
- Links point to the same server when in testing. So if content is moved to a test server the links will point to the content on the test server rather than back to a live server.
- If a server is accessed through multiple hostnames the link always points to the one the current user is accessing so avoiding the situation when the user is prompted to login again because they don't have a cookie for the alternative domain.