Not sure if I understand you correctly: window.location.search will give you back query string.
- in ACSX:
<%=Request.QueryString%>
- in TEXT/XML:
{%QueryString%}
RequestContext is working, you just need it to call it fully qualified with namespace and parent class:
- in ACSX:
<%=CMS.Helpers.URLHelper.GetAbsoluteUrl(CMS.Helpers.RequestContext.CurrentURL)%>
- in TEXT/XML:
{% CurrentDocument.AbsoluteURL |(identity)GlobalAdministrator%}