title: Http Get request: What's the difference when you access localserver and webserver?
body: <p>I'm pretty new to socket programming and I'm writing a http client right now.</p>
  <p>I'm a little confused for accessing a folder locally verse those on webserver. When I put a file into a folder locally, say my link is:</p>
  <p>http://localhost:8000/1/example.html</p>
  <p>I have to set my GET header with <code>path=/example.html</code>, <code>hostname=localhost/1</code> to make my client work, so the GET request is like:</p>
  <pre><code>GET /example.html HTTP/1.0
  Host:localhost/1
  </code></pre>
  <p>However, from a webserver, like <a href="http://info.cern.ch/hypertext/WWW/TheProject.html" rel="nofollow noreferrer">http://info.cern.ch/hypertext/WWW/TheProject.html</a>, my hostname should be set to <code>info.cern.ch</code> instead of <code>info.cern.ch/hypertext/WWW</code> and I shoud set <code>path=/hypertext/WWW/TheProject.html.</code> The request looks like:</p>
  <pre><code>GET /hypertext/WWW/TheProject.html HTTP/1.0
  Host:info.cern.ch
  </code></pre>
  <p>I just wonder what's causing this difference? Is the directory in one url works differently than a local folder?</p>