URLs with Directory Name Vs Full URLs with Filename
issueid=75 03-11-2009 08:41 AM
crush123
Number of reported issues by crush123:
URLs with Directory Name Vs Full URLs with Filename

I recently received a query from a visitor attempting to create a Sitemaps file using the Sitemaps protocol as described in the tutorial How to Get Search Engines to Discover (Index) All the Web Designer Pages on Your Site. He wanted to know whether he should refer to a page on his site as (say) www.example.com/about/index.html, as www.example.com/about/ or as both in his site map. Both web addresses ("URLs") point to the same file. This brief article attempts to answer that question. My answer, however, as you will see, applies to more than just the site map.

Web servers are configured to deliver a default web page (if it exists) whenever a browser requests for a directory name. For example, if you were to ask for www.example.com/about/, a typical web server will look for a file called index.html in the about folder of your website.

If it exists, the server will deliver that page's content to the browser. The browser's address bar, however, will still show the URL you requested, which is www.example.com/about/ in this example. If the page does not exist, and the server is not configured to look for any other index page, it will just show a directory listing of the about folder (unless you have disabled that facility on your site).

This means that for special pages like the "index.html" of your directory, there are actually two ways of accessing the file.
Issue Details
Issue Number 75
Project Website Development
Category Forums
Status Unconfirmed
Priority Unknown
Affected Version Unknown
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




+ Reply