Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rules for Relative URLs

Similar presentations


Presentation on theme: "Rules for Relative URLs"— Presentation transcript:

1 Rules for Relative URLs
SITE DIRECTORY / (server root – e.g. /gum/ /gum/sugarless/ /gum/sugarless/about.html /candy/ /candy/chewy/ /candy/chewy/cherry/ /images/logo.png All directories have an index.html page Virtual starts with / Relative does not! FORWARDS Assuming we are in the gum directory Go to the index of the sugarless: sugarless/ (or sugarless or sugarless/index.html) Go to the about page in sugarless: sugarless/about.html BACKWARDS Assuming we are in the cherry directory Go back to the index of the chewy: ../ Go to the logo graphic in images: ../../../images/logo.png To go to a file in the current directory, say the file name. To go to a file in a directory in the current directory, say the directory then the file. To go backwards a directory use ../ Never say the current directory. Note the three ways to go to an index – any are fine, the dir/ is preferred.


Download ppt "Rules for Relative URLs"

Similar presentations


Ads by Google