Top level domain from URL in C#
问题 I am using C# and ASP.NET for this. We receive a lot of \"strange\" requests on our IIS 6.0 servers and I want to log and catalog these by domain. Eg. we get some strange requests like these: http://www.poker.winner4ever.example.com/ http://www.hotgirls.example.com/ http://santaclaus.example.com/ http://m.example.com/ http://wap.example.com/ http://iphone.example.com/ the latter three are kinda obvious, but I would like to sort them all into one as \"example.com\" IS hosted on our servers.