Child pages
  • Absolute vs. Relative URL
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 65 Current »

Definitions

Absolute URL:  the full path to a file including server name and location

Relative URL: the path to a file in relation to another file.  i.e. the location of an image in relation to the html file that is specifying the image

Examples:

Absolute URL

to a file within a Sakai course site's Resources area:

https://cle.nps.edu/access/content/group/0e6cf615-18f7-4f3c-a695-f6e252f467a3/Week_1/presentations/Introduction.ppt
  • https://cle.nps.edu - Specifies the server
  • access/content/group - Specifies the Resources area
  • 0e6cf615-18f7-4f3c-a695-f6e252f467a3 - Specifies the Site (This is the site ID)
  • Week_1/presentations - Specifies the folder(s) in which the file is contained
  • Introduction.ppt - Specifies the file name

Relative URL

from a file (typically html) within the Week_1 folder

presentations/Introduction.ppt

if a file is within the same directory as the calling file just the file name is needed:

Introduction.ppt

if you need to go up a directory use a double dot

../Introduction.ppt

Creating Relative URLs in the Sakai html editor

NOTE: Relative URLs will only work from and to files within the Sakai Resources area.  i.e. A relative URL will NOT work from html within the Syllabus tool to a file in the Resources area.

1. Select the text you would like to be the link and use the Globe icon in the html editor.  
(To edit or view an existing link, you can just put your cursor anywhere in the link text)

2. Select the Browse Server button to browse the content in your site's Resources area.
   

3. When you find the file you would like to link to, select it

4. After selecting the file, the Absolute URL will be displayed in the URL field
 

5. To change this absolute URL to Relative, Change the Protocol drop-down to Other

6. Remove the leading information leaving only a relative URL
 

 7. Select the OK button to save your changes.

Video Tutorial

  • No labels