Retrieving base url path of a Magento instllation is a trivial task. Trivial if you know where to look. If you open /app/Mage.php file and look at line 204, you will se a function getBaseUrl. Function recieves two parametars, but those are not conditional. Do do a test run, open youre app/design/frontend/default/default/template/catalog/product/view.phtml file and place the following inside
<?php echo Mage::getBaseUrl(); ?>
This will echo out the base url path. Could be useful if you’re like me doing WordPress to Magento and vice versa connections and so on.
