as @Aphroz said, you can use
Mage::getBaseUrl( Mage_Core_Model_Store::URL_TYPE_WEB, true );
in order to retrieve secure base url. This returns secure url because we have specified it through second parameter true
. Here first parameter is specified as Mage_Core_Model_Store::URL_TYPE_WEB
. This means the method returns value correspond to this system configuration field web/secure/base_url
. This field is the value that we specify at
System > Configuration > Web > Secure url
so if this field is not using index.php
there along with the base url, then the method will not give index.php along with the url. If it holds index.php
, then it will return the same. So to ensure index.php is not there you can use str_replace
function.