If I understand you correctly, you could make a relative link with AJAX request.
For example, if you want to refer to a youtube-video you could make an url like this:
AJAX Request "https://youtube.com/watch?v="&VideoID
Where the VideoID would be a variable that contains the unique ID for the youtube video. I haven't tested that exact thing myself so you might need to experiment to get it to work.
Here's an image of another C2 tutorial where there's an AJAX request url made partly with variables: https://www.scirra.com/images/articles/screenshot_1.png
To do this, be sure to add the AJAX object by double-clicking your layout and selecting AJAX from the Add Object menu.