Specifying a Default or Home Page


Specifying a Default or "Home" Page

Most servers have a system for recognizing a default page in each folder, based on the name of the file. If your visitors type a URL with a directory but don't specify a file name, the default file is used (Figure 2.16).

Figure 2.15. Save the file as either index.html or default.htm in order to designate the file as the default page that should be opened in that directory.


Figure 2.16. When the visitor types the path to the directory, but omits the file name itself, the file with the default name is used.


To specify a default or "home" page:

1.

First, ask your ISP how such a default page should be named. On most servers, use index.html. (Microsoft servers generally use default.htm.)

2.

Next, when you save your file (see page 46), use the proper name.

Tips

  • You can create a default page for any and every directory on your site.

  • The default page that you create at the top level of your Web directory is your site's home page, the one that will appear when your visitors type your domain with no additional path information: http://www.yourdomain.com

  • If you don't have such a default page in each directory, most servers will show a list of the directory's contents (which you may or may not want to reveal to your visitors). To keep those prying eyes out, create a default page for every directory on your site.





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net