Forum Moderators: phranque

Message Too Old, No Replies

Named Pages VS. Named Directories?

Which is better?

         

NLConsulting

2:32 pm on Oct 10, 2006 (gmt 0)

10+ Year Member



I've been working on a rather large website (500-1000 pages) that currently uses named directories, meaning 99% of the pages in the website are called "index.nnn" and reside inside of a series of named directories, like "products/apples/gala/". In the past, I have always used named pages, like "gala.nnn" that resideds inside of a "products/apples/" directory or even in the root. My question is, which is better? I understand that with larger sites, named directories will help keep everything organized, but almost EVERY page has it's own directory, even if there is just one page within that directory which I think is ridiculous.

An example:
products/apples/grannysmith/index.nnn,
products/apples/reddelicious/index.nnn,
products/apples/gala/index.nnn, etc.
What I would do:
products/apples/grannysmith.nnn,
products/apples/reddelicious.nnn,
products/apples/gala.nnn, etc.

Am I way off base? Anyone have any opinions?

DrDoc

5:56 pm on Oct 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use a higher level directory structure to logically group your pages. Then use mod_rewrite to redirect from "apples/gala" to "apples/gala.nnn". This way you still maintain a logical (and more easily maintainable) structure, while also allowing directory based approach for how your pages are listed.

NLConsulting

8:24 pm on Oct 11, 2006 (gmt 0)

10+ Year Member



I forgot to mention, Windows 2000 server/IIS, not Apache.

Well, that's is the item in question, whether or not to allow directory based browsing. I have not in the past because I have never seen a need for it, but I've acquired this site which already has directory based browsing in place. While I work on the redesign, I'm trying to determine if I should maintain the directory based browsing or if I should switch it to a more compact browsing style, like I previously listed. I don't see any reason to have 20 separate dirs with one index file each in place when they can all be grouped in a higher dir.

encyclo

1:13 am on Oct 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you were running Apache/Unix, I would suggest using content negotiation. In this way, you can use extensionless URLs with the underlying filenames unaltered. Content negotiation is usually more flexible than mod_rewrite for this task.

On IIS, content negotiation is not available unless you use a third-party tool, but you can use directories for the categories and files with standard .htm or .html extensions for the individual pages. Creating a separate directory for each file is a recipe for content management chaos (every file is called index.html) and is quite unnecessary.

pixeltierra

6:08 am on Oct 12, 2006 (gmt 0)

10+ Year Member



If your site is as big as you say it is then IMO it's all the more necessary for good organization. What is a folder if not a grouping of things under one heading. It makes no sense to have 500 pages in 500 folders.

But if you're wondering in terms of SEO, I would say the content is what's important.

NLConsulting

3:55 pm on Oct 13, 2006 (gmt 0)

10+ Year Member



Thanks for the opinions. I too think it's a nightmare to have 500 folders each containing 1 index.shtml/asp file and a few images relavent to the page. Restructuring, here we come!

physics

4:15 pm on Oct 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I don't see any reason to have 20 separate dirs with one index file each in place when they can all be grouped in a higher dir.

I do. Use an index.* page and only link to the dir. That way if you some day change the technology of the page (index.html to index.php for example) inbound links won't point to the wrong place.