If you need to get current request URL in ordinary web application, you usually do
string requestURL = Request.Url.AbsoluteUri;
But as SharePoint does it’s own URL rewrites, if you would try that for example for the page
It would return
The solution is to use special property on SPUtility class – SPUtility.OriginalServerRelativeRequestUrl
This property returns the original URL before it was rewritten, which is useful if you need to get the subweb from which an application page was loaded.
As this URL is server-relative, to get full url, you can use:
This can be useful if you need to redirect for example to the same URL with some additional parameters.