homepage Welcome to WebmasterWorld Guest from 54.204.142.143
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Folder vs .HTML
What seems to work better
fashezee




msg:4340124
 6:56 pm on Jul 15, 2011 (gmt 0)

It's been awhile since a researched this topic.
Any news other which is better or does it still not make a difference.

What is better to have:
http://www.example.com/keyword-id/
or
http://www.example.com/keyword-id.html

 

Fotiman




msg:4340135
 7:18 pm on Jul 15, 2011 (gmt 0)

I personally would choose the former over the latter because it is platform agnostic (you could move from an ASP based site to a PHP based site with no changes to links).

Hoople




msg:4340138
 7:22 pm on Jul 15, 2011 (gmt 0)

Using the folder option allows one to:

http://www.example.com/keyword-1/keyword-2.html

Changing the file extension on server move would be the only hassle as Fotiman pointed out.

lucy24




msg:4340148
 7:53 pm on Jul 15, 2011 (gmt 0)

Are you asking about what the user sees or about your underlying file structure? If you're talking about the names at face value, you're looking at a choice between a top-level file

http://www.example.com/keyword-id.html

and a subdirectory

http://www.example.com/keyword-id/index.html {or equivalent}

That choice depends on your own site and what's most convenient for you.

You can rewrite either one from

http://www.example.com/keyword-id

but by default, anything without an extension will send your server looking for a directory and then for the index.whatever file in that directory. If they don't find it, some servers will then proceed to Option B, looking for a file with that name. It depends on whether a particular mod is present and enabled, but to be safe you'd better spend some time with your .htaccess.

Which is a different forum ;)

fashezee




msg:4340158
 8:21 pm on Jul 15, 2011 (gmt 0)

We wouldn't changing the programming language any time soon.
@lucy; with a server load perspective; better off being direct instead of having .com/keyword/ correct?

g1smd




msg:4340163
 8:31 pm on Jul 15, 2011 (gmt 0)

Use a trailing slash ONLY if the URL is for a folder or for the index page in a folder.

Extensionless URLs for pages do not have a trailing slash.

lucy24




msg:4340179
 9:24 pm on Jul 15, 2011 (gmt 0)

with a server load perspective; better off being direct instead of having .com/keyword/ correct?

I think your post overlapped g1 because I am tolerably certain he would have said to refer to the Index file as
/keyword/
rather than write it out explicitly as
/keyword/index.whatever

The reason is probably buried in the Apache docs somewhere.

g1smd




msg:4340192
 10:05 pm on Jul 15, 2011 (gmt 0)

Never link to a named index page as a URL. It's Duplicate Content. Link to the canonical URL (ending with a trailing slash) instead. It also causes problems when you change the technology that runs the site.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved