Sub Domains

Daniel Crichton danielc at helio.co.uk
Thu May 18 16:48:32 UTC 2000


"IcEMaN" <iceman__01 at hotmail.com> wrote in message
news:8fv7l0$k3i$1 at newssvr03-int.news.prodigy.com...
> Hey everyone.
>
> I was wondering if anyone knows how to set up a subdomain to point to a
> subdirectory of a server.  If say I have a domain xyz.com who's server is
> 111.111.111.111 and want sub.xyz.com to point to 111.111.111.111/sub/, how
> would I do that?  Is it even possible?

That's not a DNS issue. I'm guessing this is for http or ftp access. What
you need to do is configure your web server to look at the host name being
requested (most browsers now send an extra header called Host: that contains
the host name from the URL) and redirect the browser based on that value.
Eg. If host = 'sub.xyz.com' Then Redirect to 111.111.111.111/sub/

Then again, if your web server can handle this then you should be able to
use /sub/ as the root dir for an IP-less virtual server and not even bother
with redirection. The browser won't even know the files are being delivered
from the sub dir. Most recent web servers can do this; IIS, Apache, WebSite,
etc. and allow you to run multiple virtual web servers from 1 single IP.

Dan




More information about the bind-users mailing list