Home >> FAQs/Tutorials >> XHTML Tutorials and Tips >> Index

XHTML Tutorial - Default File Name of a URL

By: FYIcenter.com

(Continued from previous topic...)

What Happens If File Name is Missing in a URL?

If the file name part is missing in a URL, the one of the following two rules will be used.

1. If a URL has no file name, but a path name is given, the browser will let the hosting computer to supply the default file name. On most hosting computers, the default file name will be index.html. For example, the following URLs:

  http://dev.fyicenter.com/faq/
  /faq/

will be treated as:

  http://dev.fyicenter.com/faq/index.html
  http://dev.fyicenter.com/faq/index.html

2. If a URL has no file name, no path name, but a bookmark or a querystring is given, the browser will borrow the path name and the file name from the current document. For example, if the following URLs are used in this document:

  ?q=xhtml+faq
  #footer

will be converted by the browser as:

  /faq/xhtml/xhtml_hyper_link_and_url.html?q=xhtml+faq
  /faq/xhtml/xhtml_hyper_link_and_url.html#footer

(Continued on next topic...)

  1. What Are Hyper Links?
  2. What Is an Anchor "a" Tag/Element?
  3. How To Define a Hyper Link?
  4. How To Define a Bookmark?
  5. What Is a URL?
  6. What Is the Structure of a URL?
  7. What Happens If Protocol or Port Number Is Missing in a URL?
  8. What Happens If a URL Starts with Path or File name?
  9. What Is a Relative Path Name?
  10. What Happens If File Name is Missing in a URL?
  11. How To Build Hyper Link Indexes within the Same Document?
  12. What Happens If a Hyper Link Points to an Image?
  13. What Happens If a Hyper Link Points to a Music File?
  14. What Happens If a Hyper Link Points to a PDF File?
  15. What Happens If a Hyper Link Points to a ZIP File?
  16. How To Create A Link to Open a Document in a New Window?


Selected Developer Jobs:

More...