Home All Groups Group Topic Archive Search About

configure host name? localhost to localhost/(dir)

Author
3 Nov 2006 12:42 AM
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?

Author
3 Nov 2006 2:49 AM
Roger Abell [MVP]
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.

Show quoteHide quote
"Ryan" <R***@discussions.microsoft.com> 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?
Are all your drivers up to date? click for free checkup

Author
3 Nov 2006 5:24 AM
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-Develop-on-Pro-and-Publish-on-Server.aspx


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



Ryan wrote:
Show quoteHide quote
> 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?

Bookmark and Share

Post Thread options