all groups > iis security > november 2006 >
You're in the

iis security

group:

configure host name? localhost to localhost/(dir)



configure host name? localhost to localhost/(dir) Ryan
11/2/2006 4:42:01 PM
iis security: About:
I am a web DESIGNER currently building all my sites within IIS on XP PRO. My
layout is as follows:

[quoted text, click to view]

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
Re: configure host name? localhost to localhost/(dir) Roger Abell [MVP]
11/2/2006 7:49:14 PM
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.

[quoted text, click to view]

Re: configure host name? localhost to localhost/(dir) David Wang
11/2/2006 9:24:52 PM
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
//



[quoted text, click to view]
AddThis Social Bookmark Button