Get base secure URL in Magento

You must used getBaseUrl() in Magento many times and you may tried getBaseSecureUrl() and expect to get secure HTTPS URL but I guess you got empty and no error. So actually here is the right way to get different URL type in Magento with custom parameter

Get base secure URL

Mage::getUrl('',array('_secure'=>true)

-> Work when the secure URL is given in configuration only
Sometime you need to force secure URL

Mage::getUrl('',array('_forced_secure'=>true)

Check Magento wiki for getUrl function parameters  for more  custom parameters you can use