URL Anatomy and Your Work on
the dm.ampd.yorku.ca Server

Anatomy of a URL

Here are three examples of simple URLs:

1 - http://www.rabble.ca
2 - http://www.youtube.com/user/LibraryOfCongress
3 - http://kids.everykilowattcounts.com/en/games/index.html

Parts of a simple URL:

access method:    http://
This stands for hypertext transfer protocol, which is used for web pages.

domain name:    1 - www.rabble.ca     2 - www.youtube.com     3 - kids.everykilowattcounts.com
     The domain name is the first part of the URL after the access method.
If there is another / in the URL after the access method, the domain name runs until the first /

folders/directories:    2 -   user   LibraryOfCongress       3 -   en   games
     Folders or directories (if there are any) are the words that follow the domain name, coming after the first / in the URL after the http://
There may be only one folder, or there may be several, each separated by a /
Folders should never have a filename extension.
If you are looking at something coming after a / in the URL that has a filename extension, it is probably a file, not a folder.

files:    3 - index.html
     Files (if there are any) come after the last / in the URL.
A file will have a filename extension.

Student URLs on dm.ampd.yorku.ca

Student accounts on dm.ampd.yorku.ca will include a folder called Sites. Anything put into this folder is accessible on the web if you know the URL.

An HTML file (eg. named page.html) placed in a student's Sites folder on the dm.ampd.yorku.ca server will have the following URL:

http://dm.ampd.yorku.ca/web/astudent/page.html


Create a datt1939 folder inside your Sites folder on dm.ampd.yorku.ca

For this course, we ask you to create a datt1939 folder inside your Sites folder inside your account on dm.ampd.yorku.ca.

If you then saved a web page called tester.html inside that datt1939 folder inside your Sites folder, the URL for the tester.html page would be:

http://dm.ampd.yorku.ca/web/astudent/datt1939/tester.html

Create an a1 folder inside your datt1939 folder inside your Sites folder

If you create a folder named a1 inside that datt1939 folder inside your Sites folder, the resulting URL for the a1 folder would be:

http://dm.ampd.yorku.ca/web/astudent/datt1939/a1

If you then saved a web page called hedgehog.html inside that a1 folder inside the datt1939 folder inside your Sites folder, the URL for the hedgehog.html page would be:

http://dm.ampd.yorku.ca/web/astudent/datt1939/a1/hedgehog.html


Page chosen by default from a folder when no HTML page/other file specified

Some URLs end with a domain name, or the name of a folder, for instance:
1 - http://www.rabble.ca
2 - http://www.youtube.com/user/LibraryOfCongress

Even though no page has been specified in the above URLs, a page is selected and displayed. Where does this page come from, and what is it?

When a URL ends with a domain name or the name of a folder, the web server automatically chooses a page from the account/folder specified by the URL. This page is not chosen randomly or arbitrarily; depending on the server settings, the page chosen will be named index.html or default.html

In addition, by convention, every web site names its main page or landing page either index.html or default.html. This means that even if someone types in a URL without a file name specified on the end of it, the server will automatically pick and send the main web page of the site.

So even in the 2 example URLs above, an HTML page named either index.html or default.html is being sent by the server for the audience to view.

This URL: http://www.rabble.ca
Has the same result as: http://www.rabble.ca/index.html

The name picked by default by the dm.ampd.yorku.ca server is index.html.

For each web assignment you submit for this course you will need to name the first page index.html (each assignment will be submitted into a different folder with a unique name, so the different index.html files won't get mixed up or deleted by the computer).

This means that the following URL would, by default, return and display a file named index.html from inside the a1 folder (assuming that you eventually follow the assignment 1 instructions and save a web page named index.html inside the a1 folder):

http://dm.ampd.yorku.ca/web/astudent/datt1939/a1