Easy Web Design: Linking: Local Pages

Organizing Your Site

If you have more than one page on your site, you will want to keep all of your pages in the same area of your local hard drive. Netscape can then upload them as they change. (You’ll need to use the “Publish” menu item, which we won’t go into here.)

If you have a small number of pages, you’ll probably keep them all in the same directory. If you have a large number of pages, you may wish to organize them in separate directories, but keep those separate directories grouped together under the same containing directory. When you upload the files, you will need to keep the same organization on the “real” web site. This allows Netscape Composer to correctly link to your local pages. If you keep your pages in different areas across your hard drive, then when Netscape links to them it doesn’t know where the page really is on the real web site. Often, it will assume that you are linking to a file on your local drive—meaning that only you will be able to visit the link, since only you have access to your local drive.

Linking to Your Own Pages

Linking to a page that is in the same directory as your current page is almost as easy as linking to pages elsewhere on the net. Go to the same “Insert Link” menu item or button, but instead of pasting the URL, click on “Choose File…” and select the file you wish to link to. If, for example, you are linking to a page called “gothic.html”, gothic.html will then appear in the “Link Location” box.

Try to keep your pages called “something.html”, where “something” is a very short descriptive name of what your page contains. Keep spaces and special characters out of your web page filenames. While it is possible to link to files with spaces and other special characters, it increases the chances that someone will do so incorrectly, creating broken links to your site.

Normally you don’t have to worry about relative links, as Netscape Composer will handle them for you when you choose your files. You must keep your local copies of your web files in the same “order” that they are on your web site for Composer to construct these links correctly, however. Your copy of your site on your hard drive should be exactly the same as your copy on your server.

Using relative links makes it very easy to move your web pages from one server to another. Since none of your relative links contain the hostname, your links will continue to work even though the hostname has changed.

Lost?

If it be true (as it certainly is) that a man can feel exquisite happiness in skinning a cat, then the religious philosopher can only draw one of two deductions. He must either deny the existence of God, as all atheists do; or he must deny the present union between God and man, as all Christians do. The new theologians seem to think it a highly rationalistic solution to deny the cat. — G. K. Chesterton (Orthodoxy)