configure host name? localhost to localhost/(dir)

configure host name? localhost to localhost/(dir)

am 03.11.2006 01:42:01 von Ryan

About:
I am a web DESIGNER currently building all my sites within IIS on XP PRO. My
layout is as follows:

> Default Web Site (root)
>> Site 1 (directory)
>> Site 2 (directory)
>> Site 3 (directory), etc.

The Issue:
Only the server edition allows me to create addtional root web sites, which
forces me to access my web work via: localhost/(site directory).

The Question:
Is there a way to set up the directories so that the host name is reported
as localhost/(site directory) instead of just localhost?

Re: configure host name? localhost to localhost/(dir)

am 03.11.2006 03:49:14 von Roger Abell

The short answer is no. DNS or NetBt host names are
not capable of representing a full URI

I use two techniques for your situation.
1. work on one site at a time, and go into IIS mgmt UI
and change the content location for the root of the site
to point to the site I will be working on (note: this is
not so clean if different sites have different vdirs, and
is obviously not too good when working with v1 and v2
of a site and want them both available)
2. use hosts file to map www.site1.com, etc. to localhost
and have simple asp at root the server transfers to
localhost/site1/rest-of-url, etc. based on the host header
This gets problematic if you use a framework like the
DotNetNuke, Project Rainbow, Community Server, etc..
that do their own url rewriting.

"Ryan" wrote in message
news:D8AD244D-EDAA-4C18-99F7-A463BD134630@microsoft.com...
> About:
> I am a web DESIGNER currently building all my sites within IIS on XP PRO.
> My
> layout is as follows:
>
>> Default Web Site (root)
>>> Site 1 (directory)
>>> Site 2 (directory)
>>> Site 3 (directory), etc.
>
> The Issue:
> Only the server edition allows me to create addtional root web sites,
> which
> forces me to access my web work via: localhost/(site directory).
>
> The Question:
> Is there a way to set up the directories so that the host name is reported
> as localhost/(site directory) instead of just localhost?

Re: configure host name? localhost to localhost/(dir)

am 03.11.2006 06:24:52 von David Wang

Please do not multi-post.

You can do what you ask with an ISAPI Filter. It's just not the right
sort of approach, though. Your scheme only works if the host name ends
up being used as part of a URL - which is not the definition of the
hostname.

What you really want are location invariant URLs, which require the
dynamic definition of a "base" URL.


http://blogs.msdn.com/david.wang/archive/2005/07/05/HOWTO-De velop-on-Pro-and-Publish-on-Server.aspx


//David
http://w3-4u.blogspot.com
//



Ryan wrote:
> About:
> I am a web DESIGNER currently building all my sites within IIS on XP PRO. My
> layout is as follows:
>
> > Default Web Site (root)
> >> Site 1 (directory)
> >> Site 2 (directory)
> >> Site 3 (directory), etc.
>
> The Issue:
> Only the server edition allows me to create addtional root web sites, which
> forces me to access my web work via: localhost/(site directory).
>
> The Question:
> Is there a way to set up the directories so that the host name is reported
> as localhost/(site directory) instead of just localhost?