I would like to set up my IIS Express development environment to mirror what will happen on live. On live, the website responds to subdomains, so valid urls will be:
- client1.mysite.com
- client2.mysite.com
- etc.
First step: change localhost to a domain
I've edited my hosts file and my project properties so that instead of using localhost:1234
, I can use www.mysite.dev
, as per this link.
This works fine.
Second step: allow subdomains
Now I need to allow subdomains. According to this answer, I set the bindings for the site in my applicationhost.config
to:
<bindings>
<binding protocol="http" bindingInformation="*:80:" />
</bindings>
Now I'm getting 404 errors, when I browse to www.mysite.dev
. What have I done wrong? Interestingly, it does serve the site on mysite.dev
.
EDIT
Ok, I had it working for a little while, then I tried adding SSL, and that messed something up. I undid the SSL, but now the site works on www.mysite.com
but not on any of the other subdomains, which are now 404ing. I tried deleting the IISExpress folder to get it back to where I had it (momentarily), but I can't get it working like it was.