Links to Files on W: (or C: or S:)


How should you link to files (web pages, documents, or images) on your UDT W: drive (for staff webpages) or your UDT S: drive (for site webpages)?

I've shown three examples below of ways I might link to a file (hypnotic.html) on my (lberglan's) W: drive. The first two examples are fine. The third is not. (For those who like to see raw HTML code, I've listed it beneath each example. If you are not one of those people, feel free to ignore it.)

Example #1:   Hypnotic

Example #2:   Hypnotic

  • Links to: hypnotic.html
  • HTML: <a href="hypnotic.html">Hypnotic</a>

Example #1 shows an absolute link that begins with http:// and specifies the full path to the file. Please note that the text you see on the visible part of the web page may or may not include the "http://" and the full path but, behind the scenes, the HTML code for all absolute links will have them.

Example #2 shows a relative link that works only if the web page (or document or file) you're linking to is in the same folder as the web page you're linking from.*

The good examples shown above will work inside the district and outside the district; they will work on UDT systems and on non-UDT systems; and they will work for me and for other people.

Note: Individual web sites for staff (W: drives) are on the NPS staff server (staff.norman.k12.ok.us) - not on the NPS web server (www.norman.k12.ok.us) which hosts NPS school and departmental web sites.

Example #3:   Hypnotic

Try the link in Example #3. Did it work for you? No? It works for me! If you want others to be able to follow the links on your web pages you should not begin them with "file:///". Links beginning with "file" will only work for those people who access the same file system you access. If I link to a file on my W: drive, then the only person who can use that link is me. Even if I incorrectly assume the link will be seen only by other NPS staff (who have the W: drive mapped on their UDT computers) the link will still not function correctly because they almost certainly have different files on their W: drive than I have on my W: drive. This same line of reasoning follows for files on my C: drive or S: drive as well as other local and network drives. Except in very specific and unusual circumstances you should avoid "file:" in the pathnames for your links and images. If you are using a WYSIWYG-type web page editor you may not see the pathname for your link or image displayed on the page but you can check them by right-clicking on the link or image and selecting Properties from the menu that appears.


* Relative links may also reference files in other folders but the path remains relative to the current folder.


 Back 

This page last updated October 25, 2006. We have made every reasonable attempt to insure that our web pages are educationally sound and do not contain links to materials that violate the Norman Public School District's Policies on Internet and Internet Safety for the Computer Network. Opinions expressed on these web pages do not necessarily reflect those of the Norman Public School District. For more information concerning this site please email webmaster@norman.k12.ok.us.