The only constant part of the domain string is the TLD. TLD is the last bit of a domain string, such as .com, .net, .uk, etc. Everything else under this depends on the specific TLD for its position (therefore, you cannot assume that the next last part is the โdomain nameโ as for .co.uk it will be .co.
In any case, I think you're wrong. Rewriting URLs is much more suitable for this kind of thing. Read about it: learn.iis.net/page.aspx/460/using-the-url-rewrite-module
source share