Get Current Page Url of the Magento

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

Leave a Reply

Your email address will not be published. Required fields are marked *