restrict access to IIS virtual directory from root website
Posted
by senthilkumar-c
on Server Fault
See other posts from Server Fault
or by senthilkumar-c
Published on 2010-05-17T19:15:59Z
Indexed on
2010/05/17
19:21 UTC
Read the original article
Hit count: 238
iis
Hi, I have two domains (domain1.com and domain2.com). Both of them use the same Windows hosting service with IIS7.
One of the domains is being called the "primary domain" by my hosting provider and it always points to the root folder that I was given.
For the other domain, I have created a virtual directory in IIS and pointed it there.
The folder structure is like this -
root --Default.aspx --domain2folder ----Default.aspx
So, if I type domain1.com, I see the regulakr Default.aspx. But if I type domain2.com, I am shown the contents of domain2folder as if it were a separate web application - I think that is what IIS virtual directory is meant for. Well and good.
But the problem is, when I type http://domain1.com/domain2folder/, I see the domain2's website!
But I don't want that to be shown when I use the path like that from domain1. Only if they use domain2.com, user should be able to see those contents. How can I do that? Hope I am making sense.
Thanks.
© Server Fault or respective owner