The University of Texas at Austin- What Starts Here Changes the World
Services Navigation


Symbolic Links

The main UT Web server (www.utexas.edu) runs on the UNIX operating system. In the UNIX world, a symbolic link is similar to an alias on the Macintosh or a shortcut on the Windows platform by acting as a pointer to a file. Symbolic links may refer to files or directories. When people access the symbolic link through the Web they will actually see the target site in their browser, but the URL in the address/location box is the source URL not the target URL.

The ln utility is used to create symbolic links. Syntax is

ln -s sourcename targetname

where

sourcename = the path name of a file to be linked and is an existing file
targetname = the path name of the new file or directory to be created as the new name, or pseudonym for sourcename and is not an existing file
For example, if I want main.html (new file) to point to index.html (existing file), I would type:
ln  -s  index.html  main.html

The symbolic link command is a UNIX command, so you have to be logged onto UTS in a Telnet session (you cannot create a symbolic link with an FTP client).

Advantages

  • Allows URLs of entire directories to be moved at once.
  • Does not break the Back button on the browser.

Disadvantages

  • When user types in the wrong URL address, it takes them to the correct page, but it does not change the URL to the correct address in the browser's location field.
  • Pictures can be broken if the SRC is not fully specified.
  • The new page must be on the same server.
  • The symbolic link can confuse the results of a search - duplicate pages may be found for both old & new URL.
  • There is no option for showing the old page before going to the new one.

 



  Updated 2003 July 29
  Comments to TeamWeb