Get usual magento url's
<h2>Magento PHP Url's</h2>
<?php
// get base url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
// get store url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
// get route name
Mage::app()->getFrontController()->getRequest()->getRouteName();
// get url identifier
Mage::getSingleton('cms/page')->getIdentifier();
// Get full url
Mage::getUrl() . Mage::getSingleton('cms/page')->getIdentifier();
// Get Current Url
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
$url = Mage::getSingleton('core/url')->parseUrl($currentUrl);
$path = $url->getPath();
// get home url
$home_url = Mage::helper('core/url')->getHomeUrl();
// get media url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
// get js url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
// get skin url
echo $this->getSkinUrl('images/logo.png');
// get unsecure url
$this->getSkinUrl('images/sampleimage.jpg');
// get skin secure url for file
echo $this->getSkinUrl('images/ sampleimage.gif', array('_secure'=>true));