It is never a subdomain. The subdomain comes from left, and upper-level domain names stay on right, but before '/'. For example, "facebook.com" could have subdomains "software" and "resources" the full domain names would come in URLs as "software.facebook.com" and "resources.facebook.com" (no, such subdomains do not exist), along with the default "www.facebook.com".
Actually, every part of URL that comes on right of the domain name (optionally with :port) is interpreted solely by an HTTP server and does not have to be anything related to the directory structure on the server host. There are different ways to provide the effect of dynamic URL you want. With ASP.NET, it can be done using
URL rewriting techniques.
You can learn them from this article:
http://msdn.microsoft.com/en-us/library/ms972974.aspx[
^].
[EDIT]
Another approach is ASP.NET
Routing. Please see:
http://msdn.microsoft.com/en-us/library/cc668201.aspx[
^],
http://msdn.microsoft.com/en-us/library/cc488545.aspx[
^].
To compare URL rewriting with routing, please see:
http://msdn.microsoft.com/en-us/library/cc668201.aspx#aspnet_routing_versus_url_rewriting[
^].
[END EDIT]
This is pretty much all you need to know to implement it with ASP.NET. For a record, different server-side technologies offer very different means of producing the similar server behavior.
—SA