Many older browsers do not support the use of host header names. If you are using host header names to host multiple sites on the same IP address and port, implementing the following procedures provides a way for visitors with older browsers to reach the correct site.
To configure the registryHKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet \Services \W3SVC \Parameters
DLCSupport Set the value of this parameter to 1 to enable support for browsers that are capable of passing cookies.
DLCMenuString This parameter supplies the special prefix of URLs that apply to the host menu. This is a special string that the server checks all down-level requests (that is, requests without a real HOST header) against. If the URL is prefixed by this string, then it is handled as a host menu item. For example, DLCMenuString can be set to "/HostMenu". Note the initial forward slash in the string.
DLCMungeMenuDocumentString This parameter is the name of the host menu document that will be sent to browsers that do not support cookies. For example, this parameter could be set to "/Scripts/Munge.asp".
DLCHostNameString This parameter supplies the host name of the Web site that contains the index documents. For example, if your menu page resides on www.server1.com, this parameter is set to "www.server1.com". Note that all files, such as images and backgrounds, must be located on the same Web site.
DLCCookieMenuDocumentString This parameter is the name of the actual host menu document to be sent to older browsers that support cookies. For example, this parameter could be "/Scripts/Cookies.asp".
DLCCookieNameString This parameter specifies the name of the special cookie to be interpreted by the server as representing a pseudo host header. For example, this parameter could be "PseudoHost".
To redirect the browser
<html> <head><title>Server Selection Page</title></head> <body> <a href="http://www.server1.com/*www.server1.com/<%=Request.QueryString()%>">Try Server 1</a><br> <a href="http://www.server1.com/*www.server2.com/<%=Request.QueryString()%>">Try Server 2</a><br> </body> </html>
<html> <head><title>Server Selection Page</title></head> <body> <a href="/HostMenu/Scripts/Redirect.asp?Host=www.server1.com&NewLocation=<%=request.querystring()%>">Try Server 1</a><br> <a href="/HostMenu/Scripts/Redirect.asp?Host=www.server2.com&NewLocation=<%=request.querystring()%>">Try Server 1</a><br> </body> </html>
<% Option Explicit Dim DLCCookieNameString DLCCookieNameString = "PseudoHost" Response.Cookies(DLCCookieNameString) = Request.QueryString("Host") Response.Cookies(DLCCookieNameString).Domain = Request.QueryString("Host") Response.Cookies(DLCCookieNameString).Path = "/" Response.Redirect "http://" & Request.Querystring("Host") & Request.QueryString("NewLocation") %>