That was the first real life problem I ever faced .... and I figured it out
before the scripts were freely available.
I had to, they wanted to charge me for redirection/subdomains and all the rest
of it.
Heres what to do.
DONT set your nameservers to your host, as then they got you by the short and
curlies.
Keep then at your regsitrar and change CName to point to your ip.
Do this for multiple domains and that domain will stay in the url.
So http://domain1.com AND http://www.domain2.com will BOTH end up at
http://you.rip.addy/index.aspx with their own urls in the address bar
Then just redirect by pulling sites to folders from db && using
Response.Redirect.
There is another way where you generate 404 errors for every page, then redirect
from errors page(using server.Tranfer for that one as the correct page and url
remain) Thats quite cool because if you define on page name only then
http://domain1.com/anyfolder/page1.aspx and
http://domain1.com/anyfolder2/page1.aspx both go to the same page so its good
for search engines and good for stupid users.
But its slower and not good for server resources factor. Its neat but I wouldn't
use it, having said that, asp.NET uses errors via web.config so this would ease
the resources problem and put it entirely under your control.
But by far the best way is to use a HttpHandler or Module in your web config, in
fact you don't even need any web pages. But besides that, it grabs the request
before itgets to any app, the handler is inherited by sub vrs so its easy, just
plonk it in your root and redirect from there.
And thats all I'm saying about it and it'll possibly be a while before you can
handle that sort of thing.
I'd give you the code except I haven't written it yet. Will post it when I do
.... but I currently have a lot on my plate and it's min priority.