Kristofer
Wed May 03 15:18:36 CDT 2006
Hello,
An IP address is an IP address, and a folder is a folder.
127.0.0.1/sitedir is an IP address and a folder, it is not an IP address,
hence you cannot treat it as an IP address in the hosts file. A hostname
cannot be mapped to an IP address and folder (by the specification), it
can only be mapped to an IP address, hence what you are asking for is
impossible to do.
Why not have multiple websites? That would be better, and you could use
host headers. Your description of your setup indicates that you do not
have multiple websites. You have one website, with multiple (virtual?)
folders. A virtual folder is not a website.
By creating multiple websites, and use host headers to distinguish them,
you could modify your hosts file like this:
127.0.0.1 dev.sitename.com
127.0.0.1 www.sitename.com
127.0.0.1 whatever.sitename.com
In this situation, IIS will use the host header, sent as part of the HTTP
header, to know which website is designated.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
rh1200la@gmail.com wrote:
>Hey all...i have a quick question; hopefully there's an easy answer.
>
>right now on my system (IIS 6.0) I have my default website (web root)
>with multiple sites under it. I access them as
>
http://localhost/sitename
>
>I need to access a site within there as it's own website. If I make
>that site it's own website, and modify the hosts file to:
>
>127.0.0.1 localhost dev.sitename.com
>
>it works. however, i lose access to my webroot. i'm wondering if i
>can keep my default website running, but have something like:
>
>127.0.0.1 localhost
>127.0.0.1/sitedir dev.sitename.com
>
>thanks.