file system Web server programs are able to translate an URL path (all or part of it), that refers to a physical file system path, to an absolute path under the target website's root directory. Website's root directory may be specified by a configuration file or by some internal rule of the web server by using the name of the website which is the host part of the URL found in HTTP client request. Path translation to file system is done for the following types of web resources: a local, usually non-executable, file (static request for file content); a local directory (dynamic request: directory listing generated on the fly); a program name (dynamic requests that is executed using CGI or SCGI interface and whose output is read by web server and resent to client who made the HTTP request). The web server appends the path found in requested URL (HTTP request message) and appends it to the path of the (Host) website root directory. On an Apache server, this is commonly /home/www/website (on Unix machines, usually it is: /var/www/website). See the following examples of how it may result. URL path translation for a static file request Example of a static request of an existing file specified by the following URL: http://www.example.com/path/file.html The client's user agent connects to www.example.com and then sends the following HTTP/1.1 request: GET /path/file.html HTTP/1.1 Host: www.example.com Connection: keep-alive The result is the local file system resource: /home/www/www.example.com/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 its access is forbidden. URL path translation for a directory request (without a static index file) Example of an implicit dynamic request of an existing directory specified by the following URL: http://www.example.com/directory1/directory2/ The client's user agent connects to www.example.com and then sends the following HTTP/1.1 request: GET /directory1/directory2 HTTP/1.1 Host: www.example.com Connection: keep-alive The result is the local directory path: /home/www/www.example.com/directory1/directory2/ The web server then verifies the existence of the directory and if it exists and it can be accessed then tries to find out an index file (which in this case does not exist) and so it passes the request to an internal module or a program dedicated to directory listings