Magento get current url of a page

Posted by Damodar Bashyal on May 13, 2013

 

Magento core url helper allows you to get current url.

To get current url in magento you just need one line of code as below:

ref: public function getCurrentUrl()

$magentoCurrentUrl = Mage::helper('core/url')->getCurrentUrl();

You can also get current url as base64 encoded url as:

More»

QR Code: Magento get current url of a page