Well,I always wondered how sites like Blogger.com coded their custom domain support to their multiblogs software.
A user points their domain to their site with a cname, and you add it in your blog's ACP. Then your custom domain acts as if you're using an actual host, and redirects to the right blog and everything.