Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url in phtml file and cms page

Get Url in cms pages or static blocks
1. Get Base Url :

[php]
{{store url=""}}
[/php]
2. Get Skin Url :
[php]
{{skin url=’images/imagename.jpg’}}
[/php]
3. Get Media Url :
[php]
{{media url=’/imagename.jpg’}}
[/php]
4. Get Store Url :
[php]
{{store url=’mypage.html’}}
[/php]

Get Url in phtml files

1. Get Base Url:
[php]
Mage::getBaseUrl();
[/php]
2. Get Skin Url :
[php]
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
[/php]
(a) Unsecure Skin Url :
[php]
$this->getSkinUrl(‘images/imagename.jpg’);
[/php]
(b) Secure Skin Url :
[php]
$this->getSkinUrl(‘images/imagename.gif’, array(‘_secure’=>true));
[/php]
3. Get Media Url :
[php]
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
[/php]
4. Get Js Url :
[php]
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
[/php]
5. Get Store Url :
[php]
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
[/php]

6. Get Current Url
[php]
Mage::helper(‘core/url’)->getCurrentUrl();
[/php]