You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bijoy Thomas <bi...@gwu.edu> on 2004/07/13 15:54:58 UTC

[users@httpd] http question

Hi all,

   What is the difference between http://blah.com and http://www.blah.com. Does the webserver try to fetch the file from different locations?

Thanks in advance,
Bijoy.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] http question

Posted by Patrick Boutilier <bo...@ednet.ns.ca>.

Bijoy Thomas wrote:
> Hi all,
> 
>    What is the difference between http://blah.com and http://www.blah.com. Does the webserver try to fetch the file from different locations?
> 

Depends.

1. Does the DNS entries for blah.com and www.blah.com point to the same IP?

2. Do you have separate Virtual host configurations for blah.com and 
www.blah.com ?


> Thanks in advance,
> Bijoy.
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] http question

Posted by Robert Andersson <ro...@profundis.nu>.
Bijoy Thomas wrote:
> What is the difference between http://blah.com and http://www.blah.com.

They are two different host names, potentially mapping to different IPs or
machines. Some might say that the first is a domain, and second is a host.

> Does the webserver try to fetch the file from different locations?

That very much depends on the server admin. It can serve from the same
location, or it may be two very different sites. On my servers, I have this
for all domains:

    <VirtualHost *>
        ServerName www.blah.com
        ...
    </VirtualHost>
    <VirtualHost *>
        ServerName blah.com
        ServerAlias *.blah.com
        RedirectPermanent http://www.blah.com
    </VirtualHost>

So, someone going to http://blah.com or http://not-www.blah.com will get
redirected to http://www.blah.com. I consider that good practice. Instead of
the RedirectPermanent directive, I could have given it a different document
root, and have two different sites.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org