Magento 1.9 - getBaseUrl retrieving different urls

Magento getBaseUrl retrieving different urls

There are multiple ways. For examples:-

1. http://yourdomain.com/

echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); 

2. http://yourdomain.com/index.php/

echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); 

3.http://yourdomain.com/js/

 
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); 

4.http://yourdomain.com/media/

echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); 

5.http://yourdomain.com/skin/

 
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); 

No comments:

Post a Comment