Why do I need to use headers for all sites? That doesn't make sense to me - a default site is very usefull. (Nevertheless; Even if I have headers for all sites, it still doesn't work - that is why I suspect something going on benieth the "engine")
I have tried this:
- Setting header on the default site (so no default exists) to www.mydomain.com
Then nothing works; both www.mydomain.com and sub.mydomain.com return "The webpage cannot be found".
- Setting 127.0.0.1 sub.mydomain.com in host file
Then it works from the server, but not from the internet (goes to default site).
To me it looks like IIS can't see any headers and return the default site always, but if the entry in in the local host file and the call comes locally from the server, then everything works!
And of course the home directory points to different folders.
- Peter