Make URLs relative in the Web Content Tool when editing Site Info.
GENERAL
TESTING
GENERAL
TESTING
Description
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.
Activity
Matthew Buckett January 3, 2017 at 10:18 AM
We have issues with people testing on our staging service (https://staging.weblearn.ox.ac.uk) and clicking on link and being taken to the live service (https://weblearn.ox.ac.uk) while testing they don't realise this and end up testing on the live service by accident.
We could modify our DB or have special browser setups with proxies so that you get automatically redirected, but this makes sorting out a test setup more complicated and error prone.
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.