I want to get Current URL in Magento 1, using observer function, that observer triggered on the AJAX controller action.

In the observer function, I tried like :-

$currentUrl = Mage::helper('core/url')->getCurrentUrl(); it returns the controller action which wee used to call in AJAX, where us I need to get the Current active URL from the browser.

Can anyone help me with this?



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


$currentUrl = Mage::app()->getRequest()->getServer('HTTP_REFERER');
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.