0 votes
1.2k views
in Magento by
Hi Folks,

How can we get the getBaseUrl – Magento URL Path?

Thanks for all your supports.

1 Answer

0 votes
by
<?php
// http://example.com/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
// http://example.com/js/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
// http://example.com/index.php/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
// http://example.com/media/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
// http://example.com/skin/
echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
?>

Related questions

0 votes
1 answer 1.5k views
asked Jun 29, 2016 in Magento by Mark Brown
0 votes
1 answer 1.6k views
asked Jun 22, 2016 in Magento by Callum Seth
0 votes
2 answers 5.9k views
asked Jul 17, 2018 in General by anonymous
+1 vote
1 answer 1.6k views
+1 vote
1 answer 7.9k views
asked Jan 31, 2018 in Magento by Edward121 (260 points)
0 votes
1 answer 14.6k views
...