Current url
Syntax#
$this->helper('core/url')->getCurrentUrl();
Homepage
return : https://www.example.com/
Product page
return : https://www.example.com/my-product.html
Check if current url is secure
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
This will return true if the current url is secure.