I think you can use the server name to see the url, try placing this line of code at the top of the page in both cases and see if you get a different output:
<?php echo $_SERVER['SERVER_NAME']; ?>
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.