| 12:13 pm on Jun 2, 2006 (gmt 0)|
If you give the directories meaningful names, a structure like that will be very userfriendly because the URL shows how each page fits into the structure. Your problem is that some URLs may grow rather long which may be a handicap in some search engines.
I have never had problems with search engines because I had directories with only an index page.
| 3:26 pm on Jun 2, 2006 (gmt 0)|
Thanks. The reason I was concerned is because I don't see many directories ranking in Google. But I suppose not many people use them this way.
| 3:43 pm on Jun 2, 2006 (gmt 0)|
Another advantage is that a URL like this:
has fewer characters than this:
If you have a lot of internal cross-linking the saving can add up to hundreds of characters per page. That's A Good Thing in every way I can think of.
| 3:46 pm on Jun 2, 2006 (gmt 0)|
The future is extensionless! Content Negotiation.
| 5:15 pm on Jun 2, 2006 (gmt 0)|
Your biggest problem is maintaining a structure of dozens or hundreds of files all called "index.html". It becomes unmanageable after a while. If I'm building a static site I split the content into categories and use appropriate file names for each page within those directories with a .htm or .html extension. If the site is small, I simply put all the files in root.
For a dynamic site, I use mod_rewrite to create extensionless URLs from the variables - for example:
relates to two variables "category" and "page".
The problem with extensionless URLs is that you need to check how the server handles the presence or absence of the trailing slash - which should always be present when using physical directories. Yahoo, for example, lists such links without the trailing slash, forcing a 301 redirect to the correct page. Pages with extensions (best to always stick to generic extensions such as .html rather than .asp or .php) at least have the benefit of being absolutely clear. Don't forget that 99.99% of visitors will never look at the URL structure at all - it offers almost no real-world aid to usability except for type-ins.
As pageoneresults mentions, Content Negotiation is the way forward, but it is often not available by default on shared servers. This allows you to use standard files server-side but refer to them without extensions - the server will serve the most appropriate file dependent on different factors. For example you could have two index files:
And the content negotiation would serve the page in English or French dependent on the language preferences defined in the user's browser - all this under the same URL:
| 6:10 pm on Jun 2, 2006 (gmt 0)|
Thanks for the thorough explanation Encyclo. I had no idea what Content Negotiation was.
| 9:31 pm on Jun 2, 2006 (gmt 0)|
It's certainly something worth learning.
Content Negotiation [httpd.apache.org]
Content Negotiation: why it is useful, and how to make it work [w3.org]
| 12:50 am on Jun 3, 2006 (gmt 0)|
My top page that gets almost all of my visitors and earnings is the index page of a subdirectory.
It's the links and other factors in the algo that gets it there, not wheter it is the root page or the main subdirectory page. And yes, I like the way I can give each subdirectory a name that specifically describes what is contained there.
I have to have subdirectories just to organize my site as well. You do have to be careful you don't put the wrong index page in the wrong directory. Always check after you upload.