Web Pages That Don't Work - An Image Problem

You just used your PC to create a super web page with whiz-bang graphics. You used the recommended technique to upload the files to bama.ua.edu and, sigh, the graphics aren't there. All you get is the same, rather cryptic image where your images are supposed to be and, to top it all off, the links are all broken. So, what happened?

Well, these PC programs try hard to transfer the information to bama correctly, but sometimes they fall short. In the case of images, what happens most often is that the image file-name, as created during the upload to bama, is not the same as the image name called by the web page. In the case of links, most often the link doesn't give the right information about the "path," although it can have a filename problem, too.

Using WS-FTP to Fix the Web Pages

WS_FTP is a PC program that uses File Transfer Protocol to move files between different computers. You may have used this program to upload your web pages onto bama. With this technique you will use a Web browser and WS_FTP, both running on your PC at the same time. You will use the browser to discover what the web page wants the files or links to be named, and you will use WS_FTP to rename them on bama.

  • Connect to your bama account using WS_FTP. Change directories on the right-hand side (the bama) side until you are in the directory where your web page is located (under public_html).
  • To fix a missing image, use the browser and point at the missing image icon. Press the right mouse button. Make a note of what the image is called as listed by the "View Image" option in Netscape or the Properties option in Internet Explorer, paying attention to upper and lowercase letters and the use of spaces in the name.
  • For a missing link, note the name of the link required as listed in the "location" or "address" box on the browser, depending on whether you use Netscape or Internet Explorer, respectively. Again make note ofupper and lowercase letters and the use of spaces
  • With WS_FTP, look at the list of images and web pages on bama. Determine if the image or web page that is there in your bama account, but has incorrect capital or lowercase letters in its name, or has had its name truncated. If you want to make sure that you have found the correct image or web page, you can set it to be the address that the browser loads so that you can view it directly.
  • Use the "Rename" option in WS_FTP and change the name on bama to the exact name the web page requires. This option in WS_FTP is a button found to the right of the directory/file list for bama. Highlight the filename you need to change in the list on bama and click "Rename."

There are no special tricks to identifying which file is the correct one to be renamed on bama. You'll have to view them with the browser if there is some ambiguity.

Using Unix Commands to Fix the Problem

With this technique you will use a browser and you will log directly on to bama to fix your web pages. Again, you will use the browser to discover what the web page wants the file to be called. You will use Unix commands to rename the files.

  • Telnet to bama and log in to your account.
  • Change to the directory where your web page is located. This should be under "public_html".
  • To fix a missing image, use the browser and point at the missing image icon. Press the right mouse button. Make a note of what the image is called as listed by the "View Image" option on Netscape or Properties on Internet Explorer, paying attention to upper and lowercase letters and the use of spaces in the name.
  • For a missing link, note the name of the link required as listed in the "location" or "address" box on the browser, depending on whether you use Netscape or Internet Explorer, respectively. Again make note ofupper and lowercase letters and the use of spaces
  • Use the Unix "ls" command to list the files in the directory and search for the most likely candidate.
  • Use the Unix "mv" command to rename the file.

Doing all the work with Unix

If you are very bold you can fix the web pages just using Unix. There is nothing special about a web page (html document). It is just plain text, albeit rather confusing at times. Use an editor on the html document directly on bama and either change the image and web-page links in the html document to what the file names actually are or rename the files to the match the web pages. You'll have to check the files on bama to know what is there, possibly running a browser to check the content of the pages or images.

Preventing the Problem From the Start

Of course, the caveat to this is that if you re-upload your web pages you risk re-introducing the same problems all over again. There are steps you can take on your PC so that you have fewer problems to begin with.

  • Don't use spaces in names of images or web pages. Web browsers change spaces into the symbol %20. This means the web server on bama will be directed to look for a file with the wrong name.
  • Keep your file names short. Some uploads truncate names to the 8.3 syntax (eight characters in the main part of the name, three in the suffix). The web page may be calling the image "my-wonderful-image.gif," but the file may be named my-won~1.gif on bama. As an alternative use the most up-to-date version of WS_FTP. The 16-bit version (the one with the pink icon) will truncate names.
  • If you enter a link for one your own pages in your html document on the PC, don't put in an absolute path name. Some editing programs have an option that determines whether absolute or relative links are used.

 

© 1999, The University of Alabama. The information included here is for the University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.