[Techtalk] Resolving a doman name

Kai MacTane kmactane at GothPunk.com
Fri Jan 21 09:32:32 EST 2005


At 1/20/05 01:49 PM , Mary wrote:
>Another possible test is to scpecifically ask 67.18.218.195 for your
>host's index.html
>
>$ telnet 67.18.218.195 80       [<- you type]
>Trying 67.18.218.195...
>Connected to 67.18.218.195.
>Escape character is '^]'.
>GET /index.html HTTP/1.0        [<- you type]
>Host: example.com               [<- you type, replace example.com with 
>your hostname]
>                                 [<- you type -- just press Enter/Return]
>[response starts here]

A couple of notes, to add to what Mary said: if the web server is properly 
configured, you can just use:

GET / HTTP/1.0

instead of "GET /index.html HTTP/1.0". (Indeed, if "GET / HTTP/1.0" 
produces an error, you've got something going wrong in your configuration.)

Also, if you don't want the entire index.html to come scrolling through 
your telnet session, you can use:

HEAD / HTTP/1.0

And you should get back just the HTTP headers, without the rest of the 
file. It should look something like this:

HTTP/1.1 200 OK
Date: Thu, 20 Jan 2005 22:22:30 GMT
Server: Apache/1.3.29 (Unix) PHP/4.3.8 mod_perl/1.29
X-Powered-By: PHP/4.3.8
Connection: close
Content-Length: 4835
Content-Type: text/html

If you know your index.html is 75Kbytes, this can save you a bunch of 
screens of scrolling. (Also, if your index page is that big, you might want 
to consider paring it down a little, because people on dial-up connections 
are getting bored and going elsewhere...)

                                                 --Kai MacTane
----------------------------------------------------------------------
"These eyes see more than window dressings
  and stoic virtue of mannequins:
  Somewhere beyond the world of single dimension,
  Beyond the façade of the sensual,
  Where nothing cuts you deeper than your own blade."
                                                 --The Last Dance,
                                                  "Fairytale (the Storm)"



More information about the Techtalk mailing list