HTML and CSS Reference
Files with an extension of .cgi, .php, .jsp, and .asp generate dynamic web
pages. hese are typically placed in the list ahead of the static HTML iles that
have extensions of .shtml, .html, and .htm. If no default index ile from the list
of names is found in the directory, a web server may be conigured to generate
an index listing of the iles in that directory. his applies to every subdirectory
in the website's document root. However, many of the coniguration options
for a website can be set or overridden on a per-directory basis.
At the most structurally simple level, a website can consist of a single ile.
script elements in this ile or referenced from other sites. Likewise, any images
or media objects could be referenced from external sites. A website with only
one web page can still be quite complex functionally. It can draw content from
other web servers using AJAX techniques, can hide or show document ele-
ments in response to user actions, and can interact graphically with the user
using the HTML5 canvas elements and controls. If the website's index ile is an
executable ile, such as a CGI script or PHP ile, the web server runs a program
that dynamically generates a page tailored to the user's needs and actions.
Most websites have more than one ile. A typical ile structure for a website
may look something like Example 5.1.
example 5.1: the file structure of a typical website
|_ cgi-bin /* For server-side cgi scripts */
|_ logs /* Web access logs */
|_ public_html /* The Document Root directory */
|_about.html /* HTML files for web pages */
|_ css /* Style sheet directory */