Main domain site and subdomain site are the same exact site - Why?

T

Tom

I'm getting frustrated with something. Why is it when I publish files
from Frontpage to my subdomain (ex. subdomain.domain.net) the exact
same thing is copied to the main domain (ex. domain.net). So,
basically the domain and subdomain show the exact same site in the
browser...how do I make it so the main domain (ex. www.domain.net) and
the subdomain (ex. www.subdomain.domain.net) are two different sites?
I don't want to see the site at the subdomain address everytime I go
to the main domain. Please bare with me, my frontpage skills are not
the best, but this is just frustrating. Thanks in advance for any
help.
 
G

Guest

I presume that subdomain.domain.net and www.domain.net (or whatever) both
resolve to the same IP address. If so, they're both going to point to the
same Web server and deliver the same content.

One way of avoiding that is to get a second virtual server from your host,
have your host configure it to respond to a different IP address, and have
one of the host names point to that address.

Another way is to get a second virtual server and have your host configure
the Web server to filter incoming traffic based on the host name the Web
visitor specified.

Another way is to have your host redirect incoming requests based on the
host header. Typically, if the host header specified subdomain.domain.net,
the web server would redirect it to www.domain.net\subdomain. (This is very
confusing to some designers, BTW, because they can't publish to
subdomain.domain.net. Instead, they need to publish to
www.domain.net\subdomain.)

Another is to put an ASP script like this in your home page:

<%
if request.servervariables("HTTP_HOST") = _
"subdomain.domain.net" then
response.redirect "/subdomain"
end if
%>

where /subdomain is the name of a subweb on the same server. However, this
only works on pages where you add that script, and it doesn't work well when
visitors bookmark pages within the redirected site.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
T

Thomas A. Rowe

The best way to work with subdomain, when you have the FP extensions installed on the account, is to
create/publish the subdomain content to a FP subweb/subsite (http://www.domain.net/subweb) and then
the host would set the DNS to point http://subdomain.domain.net to /subweb folder.

From a browser a user would see http://subdomain.domain.net

From FP you would see/access http://www.domain.net/subweb.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Tom

Thanks Jim for the information. After messing around with it a bit, I
think I've finally figured it out. I'm having the subdomains point to
different destination folders on the host server (only keeping the
main domain pointed at the root). By doing this, I don't need to
create the ASP script to redirect. Thanks a bunch, greatly
appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top