Folders and Files and Servers

When you create your web pages you have to give them file names of course. There are a couple of things that you should be aware of when you decide on your file and folder names.

First, there are essentially two types of web server: Linux and Windows based. The file and folder names on Linux web servers are case sensitive, while windows are not case sensitive.

The recommendations for filenames and folders in both types of servers are:

no spaces
lowercase
alphabetic characters (a – z)

so don’t use “odd” characters like quote marks, brackets and so on.

The file extension for a web page should be htm or html You may come across other file extensions such as php for the PHP programming language, or .aspx for the dot net programming language, but for all our work we will be using htm or html

Web sites can consist of a very large number of files and folders and normally we create folders to make logical structures. A simple web site with one folder may look something like the following:

Screenshot from 2020-10-21 00-41-29

Note that for each folder there will always be a default page and this default page will have a file name of one of the following:
Index.html
or index.htm
or default.html
or default.htm

The default page is the “home” page for that folder or the first page that the visitor goes to. In our example above, when the visitor enters in http://www.sitename.com the server “knows” to send the visitor to index.html even though the visitor did not explicitly identify that in the requested URL.