$url = $query->self_url
Returns the URL of the current script with all its state information intact.