How to Get Current URL with and without parameters in Magento.?

To fetch the current URL in Magento then you need to do this with getCurrentUrl() method in Magento. There are many similar instances and conditions that are discussed below to...