Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a sub domain on a Win2K Server 1

Status
Not open for further replies.

garymgordon

Programmer
Joined
Apr 5, 2000
Messages
307
Location
US
I am hosted on a Windows 2000 server.
I have a domain set up at .
I have a sub-domain that they set up for me called:
bobby.gordondesigns.com.

It is set up so it pulls the Default.htm file from the folder called bobby on the server. (this is fine).

But, when you enter:
into the address bar, it goes to instead of just
They have it set up so it forwards to that folder.

I don't want it to foward to that folder.

I want it to stay at yet point to the folder called bobby .

My hosting company doesn't know how to do this and I was hoping that someone might be able to tell me ... what I can tell them ... in order for the subdomain to work as described above.

Can anyone help???

Thanks,
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
set up a website using the host header name bobby.gordondesigns.com,
and set the root of that website in the bobby directory ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
peterve,

I kind of did that. That's the problem.

I created (per their instructions) a host header file that redirects users to the folder "bobby".

But ... this then appears in the address bar.

This doesn't appear to work correctly, especially if I wanted to send someone to a file called - for example - test.html within the bobby folder.

Anyhow the host header file does forward me to the bobby folder, but as I said it also changes the url in the address bar to indicate this as well.

Any comments???

Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
are you hosting both websites on the same server ?

Create following DNS entries :

and
bobby.gordondesigns.com

and let them point to the same IP address

then set up both websites on the same server,
set the host header field for both websites

Let the first website home directory point to directory 'x'
and let the first website start directory point to directory 'bobby'

At that point, both websites are not linked to each other whatsoever

make sure there are is no redirector code in any of the webpages

i've set this up many many times and I have no problems with it...

good luck ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
That's basically what I did, but the address bar displays the full url of where I pointed.

Here's what I had created ... maybe you can see what's wrong.

<%response.buffer=true%>
<html>

<head>
<title>Host Headering</title>
</head>

<body>
<%
if Ucase(Request.ServerVariables(&quot;SERVER_NAME&quot;)) = &quot; then
Session(&quot;web&quot;) = 2
title = &quot;GORDONDESIGNS&quot;
pagename = &quot;GORDONDESIGNS&quot;
elseif Ucase(Request.ServerVariables(&quot;SERVER_NAME&quot;)) = &quot;GORDONDESIGNS.COM&quot; then
Session(&quot;web&quot;) = 2
title = &quot;GORDONDESIGNS&quot;
pagename = &quot;GORDONDESIGNS&quot;

else
Session(&quot;web&quot;) = 1
title = &quot;BOBBY&quot;
pagename = &quot;BOBBY&quot;
end if

web = Session(&quot;web&quot;)
%>
<%if Session(&quot;web&quot;) = 2 then
response.redirect &quot; & &quot;/main.htm&quot;

else
response.redirect &quot; & &quot;/bobby/&quot;
end if
%>
</body>
</html>


Let me know.

Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
take away all of the code,
and use the host header names in IIS... it will redirect the http request automatically to the right website ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
Peter,

Can you tell me where to go and look in order to make the changes in IIS to do this.

Thanks,
Gary
Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
I assume you know how to create a new website in IIS
then select the website name, rightclick and choose properties
go to the 'Website' tab,
click 'advanced'
under 'multiple identities for this web site' :
edit the line called
'All unassigned TCP port 80'
fill in the exact name of your website in the host header field (e.g.
Do the same for the second website as well (but use the other website name in the host header field)

If both and bobby.gordondesigns.com point to the same IP address,
then your IIS server will determine which website it has to show based on the host header field...

Does this make sense ? ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
Peter,

But where in this ... do I tell it that bobby.gordondesigns.com is actually supposed to look directly in the sub folder called bobby . So, it would treat as bobby.gordondesigns.com ???

Thanks!
Gary

Again:

bobby.gordondesigns.com should represent (yet display bobby.gordondesigns.com - in the address bar ... without the /bobby part.)

Gary M. Gordon, LLC
webmaster@garymgordon.com
Certified Web Developer ::
Application Programmer
 
well, create website on your webserver, and let the root directory point to e.g. d:\websites\
then create a second website called bobby.gordondesigns.com
and let the root of that website point to
e.g. d:\websites\
this assumes that both of the websites are hosted on your server... (you must host both of them on the same machine) ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
no problem,
glad I could help ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top