How to check if URL has http:// or https://?
You can use
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
or
$isSecure = Mage::app()->getFrontController()->getRequest()->isSecure();
Source here.
You can use below as another solution:
if (Mage::app()->getStore()->isFrontUrlSecure()
&& Mage::app()->getRequest()->isSecure()
) {
// current page is https
}else {
// current page is http
}