Web Server - Path Translation

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.html

The 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.com

The 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.html

The 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:

    If you are ambitious of climbing up to the difficult, and in a manner inaccessible, summit of the Temple of Fame, your surest way is to leave on one hand the narrow path of Poetry, and follow the narrower track of Knight-Errantry, which in a trice may raise you to an imperial throne.
    Miguel De Cervantes (1547–1616)

    Whilst Marx turned the Hegelian dialectic outwards, making it an instrument with which he could interpret the facts of history and so arrive at an objective science which insists on the translation of theory into action, Kierkegaard, on the other hand, turned the same instruments inwards, for the examination of his own soul or psychology, arriving at a subjective philosophy which involved him in the deepest pessimism and despair of action.
    Sir Herbert Read (1893–1968)