http://blah/blah/?blah to http://blah/blah/
Uri uri = new Uri(@"http://blah/blah/?blah"); string leftPart = uri.OriginalString.Replace(uri.Query,string.Empty);