anve
anve

Reputation: 183

Https website physical path points to subfolder

I think I somehow messed up my configuration and now it is not working as I would like to. The situation is as follows:

I have two different web applications hosted under c:\web\site1 and c:\web\site2. I have setup then in IIS as two separate websites where the physical path is set to the locations above. Site1 is bound to http port 80 and it works great to access it as http:// mydomain/site1.

Site2 however, should use https and port 443 (SSl cert etc is working properly). I would like this to be accessible from https:// mydomain/site2. The problem is that this gives me an IIS 404 page where it is indicated that I tried to access the physical path C:/web/site2/site2!

How can I solve this? It seems that https:// mydomain/ maps to physical path C:/web/site2 for some reason. I just want this to work in the same way as for site1 above.

Any help greatly appreciated!

Upvotes: 0

Views: 1098

Answers (1)

David
David

Reputation: 34573

If your 1st site in IIS has a path set to "c:\web\site1" and is bound to port 80, then...

  • The url http://mydomain will map to "c:\web\site1"
  • http://mydomain/site1 will map to "c:\web\site1\site1"

Same for the 2nd IIS site. If the site's path is set to "c:\web\site2" and is bound to port 443, then...

  • https://mydomain maps to "c:\web\site2"
  • https://mydomain/site2 maps to "c:\web\site2\site2"

If you want http://mydomain/site1 to map to "c:\web\site1", then you have 2 options...

  1. Change your IIS site's path to just "c:\web"
  2. Or add a virtual directory called "site1" under the root of the IIS site and point that to "c:\web\site1"

Upvotes: 1

Related Questions