Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: bakedjake

Message Too Old, No Replies

Mod Re Write Formatting

Is there a best practice protocol?

     

markd

7:26 am on Jun 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dear all

We are using mod_rewrite on a project at the moment and currently have URL's following a basic format such as:

/product_category/product

My question is, is there any advantage to adding a file extensions to the URL such as

/product_category/product.php

Is there any advantage for the user or the search engine in using an extension and creating an impression of viewing 'a page'?

Regards

Samizdata

10:11 pm on Jun 20, 2008 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Probably a question for the Apache forum.

I would say that there is no advantage to showing an extension - neither search engines nor users care, and if you ever change from PHP to something else it will be extra work.

...

markd

8:52 am on Jun 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for your reply. Will note the Apache forum for next time.

vincevincevince

8:23 am on Jul 13, 2008 (gmt 0)

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you must add an extension, add one which indicates the content of the file not the technology which generated it. Therefore, an HTML file could usefully end in .html, but gains nothing by ending in .php. Then again - HTML may not be the language of choice for webpages in the future - so play it safe and put nothing there as an extension.

Personally - I like to customise the extension to the site - perhaps a site about Widgets would have pages ending in .widget... probably SEO benefit as well as a chance for added branding.

Classic link: Cool URI's don't change [w3.org]

TowerOfPower

4:48 pm on Jul 28, 2008 (gmt 0)

10+ Year Member



I believe the general consensus today is to get away from any extensions. And this is what I have seen many websites do.

But...

Personally I think this is very wrong, and my experience is that if your page generates html, give it an .html ending...

I also have non-conclusive evidence that this actually helps your SEO ranking with Google these days. And not just marginally, but by a good percentage.

There is also the benefit of not confusing anyone or anything [spiders,bots,crawlers] of whether URL /cat/sub[/] is a page or a folder. Most of them will try to add an ending '/' to see if they can get into it deeper. And if you do not have the proper mod_rewrite rules set, you are going to have duplicate content. Yes, Google is smart enough to figure it out, but you will still get penalized a bit.

markd

6:45 pm on Jul 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Tower - interesting points
 

Featured Threads

Hot Threads This Week

Hot Threads This Month