Forum Moderators: open

Message Too Old, No Replies

site file naming conventions

using .html vs "/"

         

kvanbeurden

2:49 am on May 13, 2002 (gmt 0)



i read an article where it said that usability was best served by naming files without extensions and using "/", as in a virtual directory.

if i have a file named "chimchim.html", to use the "/" method---do i create a folder named "chimchim" and then rename "chimchim.html" as index.html in the folder "chimchim" and call the file by ../chimchim/ ???

or have i missed the boat on this one?

thanks. sorry it is so wordy!

DrDoc

4:59 am on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, that is true, but not always.

Example: If you have a big section on a site, don't let the first page for that section be section_name.html .. Instead, move all the documents that belong to that section to its own directory.

However, it would be quite pointless to let every single file have it's own directory ..

Does that make more sense? :)

buckworks

5:29 am on May 13, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I'm not sure it would make much difference to usability if you were just linking to this or that page within your site. If all the user needs to do is click a link, they won't likely care what the URL contains as long as the anchor text of the link tells them what to expect if they click through.

That said, short, simple URLs such as yoursite.com/whatever do work better than long, complex URLs
1) in emails, and
2) for any kind of offline promotion

DrDoc is right that it would be overkill to put every page in its own directory, but for selected pages it might be worthwhile. Also consider using .htaccess redirects so you could use shorter URLs in emails or offline without needing to change existing pages. Be cautious about letting search engines get hold of .htaccess redirect URLs, though, in case they interpreted them as duplicate content.

DrDoc

3:31 pm on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>> I'm not sure it would make much difference to usability if you were just linking to this or that page within your site.

Well, buckworks, not for the visitor ... but for the developer it might ;)

ergophobe

5:33 pm on May 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



1. You don't necessarily need a new directory for each file. Under Apache you could use mod_rewrite to rewrite all URLs of the form [domain.com...] to look for a file named [domain.com...]

2. The advantage is that you can change your backend without breaking links from other pages to yours. Say your files are named /path/to/file.html and you decide to switch to Cold Fusion, now your files are at /path/to/file.cfm and links from search engines and other sites are now broken.

Tom