Path Translation
Web servers are able to map the path component of a Uniform Resource Locator (URL) into:
- A local file system resource (for static requests)
- An internal or external program name (for dynamic requests)
For a static request the URL path specified by the client is relative to the web server's root directory.
Consider the following URL as it would be requested by a client:
http://www.example.com/path/file.htmlThe client's user agent will translate it into a connection to www.example.com with the following HTTP 1.1 request:
GET /path/file.html HTTP/1.1 Host: www.example.comThe web server on www.example.com will append the given path to the path of its root directory. On an Apache server, this is commonly /home/www (On Unix machines, usually /var/www). The result is the local file system resource:
/home/www/path/file.htmlThe web server then reads the file, if it exists and sends a response to the client's Web browser. The response will describe the content of the file and contain the file itself or an error message will return saying that the file does not exist or is unavailable.
Read more about this topic: Web Server
Famous quotes containing the words path and/or translation:
“Often on bare rocky carries the trail was so indistinct that I repeatedly lost it, but when I walked behind him I observed that he could keep it almost like a hound, and rarely hesitated, or, if he paused a moment on a bare rock, his eye immediately detected some sign which would have escaped me. Frequently we found no path at all at these places, and were to him unaccountably delayed. He would only say it was ver strange.”
—Henry David Thoreau (18171862)
“The Bible is for the Government of the People, by the People, and for the People.”
—General prologue, Wycliffe translation of the Bible (1384)