restore baseUrl, and use it to set the link values properly