Home » Magento23 November 2009

Magento: Get current URL of the page

Getting URL of a current page you are visiting or working on is a common requirement in any web development project. There are various ways you can get the current URL of a page in Magento. Here are some :-

From Mage_Core_Helper_Url class

From Mage_Core_Model_Store class

If you want to get the root URL of your Magento shop then you can use the following code:

Another way to get current url


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed