I'm not too sure what u mean. For me, i have a 'global' variable called $url, which is referenced by every page because...I used include("header.inc") in every page...and in header.inc, there's the site URL definition like:
$url = "http://www.mysite.com"
In the links, i use:
<a href="<?php echo $url; ?>/mylink1.php">Link 1</a>
Hope this helps 🙂 so far, it's working fine and is flexible.