System hostname ???

From: Chow (cnadella_at_excite.com)
Date: 08/11/04


Date: 10 Aug 2004 20:30:19 -0700

Hello Penguins,

    I have a question about my hostname setup for my webserver and
application server on my redhat 7.2 linux machine.

    I want to understand how actually browser resolves the hostname
part of the request url when a request is posted. For example we have
two url's,

     One is absolute URL,

        http://hostname/sampleuri/test.html

     and other is relative URL,

         /sampleuri/test.html

     for say in a simple web page when we have two links to the above
two urls both resolve to

     http://hostname/sampleuri/test.html ( assuming http://hostname is
where the request came from in the second case).

     I want to know if we have to configure something in the system
properties in the OS like in /etc/hosts file or somewhere to do that.

     I want to know how the browser actually get the hostname part of
the complete URL in the second case (Relative URL) and forms a
qualified URL to the resource. Please check the below url for my
question ( See the source of the file if you want to see the HTML
code)

     http://www.geocities.com/cnadella/

     http://geocities.com/cnadella/

    Observe the second url's full path to see the difference for above
two request URLs.

    I really don't if it is a system level configuration or a
webserver/application server level configuration. Please help me
understand this if anybody knows about it.

    Thanks a lot in advance.

Cheer,

Nadella