Fixing bug 866413 - Replacing absolute urls for links to relative paths

Please review the changes. This allows the links to work correctly even after a domain name change.