I need to host multiple sites on same domain in IIS (local). I have two sites :
- Site 1
- Site 2
Both have different root folders and one is a CMS application (Site 1) while the other is a pure HTML site (Site 2).
I need to host it as such :
www.mytestsite.com (Site 1)
www.mytestsite.com/childtestsite (Site 2)
I can get the first one working by making the necessary changes in the host file. However, as I understand, I need to host the Site 2
on a different port in IIS. Due to this, I am unable to use the host file. So, what would be the best way to get this working?
There is no need to host website on different port, you can host multiple websites on single IP addresses (or on localhost) with necessary host header value. You can just add another website on port 80 with host header value.
As an alternative, you can also browse your website through subdirectory and subdomain as follows:
www.mainsite.com/childtest
childtest.mainsite.com