Even though your two sites share the same IP address, you can set them up as separate web sites in IIS (and other Web servers). What you need to do is set up two separate sites and enter the host name (
www.mypage1.com or
www.mypage2.com) in the Host Header Name field for each site. This field is accessible via that Advanced button next to Web Site Identification in the Web Site Properties page.
FoxWeb Support Team support@foxweb.com email |
Sent by Carlos Fuertes on 10/14/2004 10:03:10 AM:
Thanks for your help, even not being a Foxweb-related question. The problem is that both domains
www.mypage1.com and
www.mypage2.com have the same IP Address. I have tried with a Foxweb Script and it works perfectly (please, see it below), but I need to do the same with raw HTML or Javascript, because when a user types the URL in the browser I need to catch the Server_Name in order to redirect the request to one or another
<HTML>
<HEAD>
<TITLE>Untitled document</TITLE>
<% DO CASE
CASE LOWER(Request.ServerVariables('SERVER_NAME'))='www.mypage1.com' %>
<META HTTP-EQUIV="refresh" CONTENT="1;URL=http://www.mypage1.com/home">
<% CASE LOWER(Request.ServerVariables('SERVER_NAME'))='www.mypage2.com' %>
<META HTTP-EQUIV="refresh" CONTENT="1;URL=http://www.mypage2.com/other">
<% OTHERWISE
lcVariable = Request.ServerVariables('SERVER_NAME')
Response.Write('Nombre del Servidor pasado: '+lcVariable)
ENDCASE %>
</HEAD>
<BODY >
<P>
<FONT FACE="Verdana"><SPAN STYLE="font-size : 8.0pt;">Wait a minute, please ...</SPAN></FONT>
</BODY>
</HTML>
Thanks for your appreciated help
Carlos
Sent by FoxWeb Support on 10/13/2004 09:56:39 PM:
Correct me if I'm wrong, but this is not a FoxWeb-related question. In any case, here it is:
You need to create two separate virtual servers: one for
www.mypage1.com and one for
www.mypage2.com. Most Web servers support specifying a redirection for requests to specific pages, or even to the root of your server. You will need to specify such redirection for the root folders of each of your virtual servers.
FoxWeb Support Team support@foxweb.com email |
Sent by Carlos Fuertes on 10/13/2004 06:51:01 AM:
Hi, I have two web sites in the same server and I need to redirect to one or another depending on the URL typed by the user. I mean, if a user types on his browser
www.mypage1.com the html file Index.htm located at the wwwroot of the server should redirect the user to
www.mypage1.com/home1 and if a user types
www.mypage2.com then the same file should redirect him to
www.mypage2.com/home2.
Any help will be apreciated
Thanks