I have list of press releases in a landing page. When you click on that it should open the respective Press release page (detail page).
This works fine in Live, but in staging the link is going to the Live URL.
The below code is used to construct Live URL.
How can I construct a URL which works for stage as well as for live?
string pressReleaseUrl = "http://";
string[] liveUrlSplit = LiveUrl.Split('/');
for (int i = 1; i < liveUrlSplit.Length - 1; i++)
{
pressReleaseUrl += liveUrlSplit[i];
}
LiveUrl
come from?