Tag Archives: Site url

How to get site URL – Magento

You can use the following function to get site urls .

Below given are the function with different arguments

Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS) – http://phpcodez/js/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) – http://phpcodez/index.php/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) – http://phpcodez/media/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) – http://phpcodez/skin/
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)  -http://phpcodez/
$currentUrl = $this->helper(‘core/url’)->getCurrentUrl();