You can get the current page URL and its parameters (if any) by using getCurrentUrl() method in Magento. Below code will show you how to use it. Consider for example you have this URL:

http://www.example.com/review/product/list/id/32/name/nick

To get this (current) URL in your module:

1
2
$currentUrl = $this->helper('core/url')->getCurrentUrl();
//Gives: http://www.example.com/review/product/list/id/32/name/nick

To get current URL parameters:

1
2
3
4
$params = $this->getRequest()->getParams(); //all the parameters
//Gives: Array ( [id] => 32 [name] => nick )
$param = $this->getRequest()->getParam('name'); //parameter "name"
//Gives: nick

To get only URL without parameters:

1
2
3
$request = $this->getRequest();
$urlWithoutParameters = $this->getBaseUrl() . $request->getRouteName() .DS. $request->getControllerName() .DS. $request->getActionName();
//Gives: http://www.example.com/review/product/list