Welcome to WebmasterWorld Guest from 54.167.65.217

Forum Moderators: bakedjake

Message Too Old, No Replies

Mod Re Write Formatting

Is there a best practice protocol?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 8, 2001
posts: 665
votes: 0


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

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

Senior Member

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

joined:Aug 29, 2006
posts:1312
votes: 0


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.

...

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 8, 2001
posts: 665
votes: 0


Thanks for your reply. Will note the Apache forum for next time.
8:23 am on July 13, 2008 (gmt 0)

Senior Member from MY 

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

joined:Apr 1, 2003
posts:4847
votes: 0


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]

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

Junior Member

10+ Year Member

joined:July 17, 2003
posts:60
votes: 0


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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 8, 2001
posts:665
votes: 0


Thanks Tower - interesting points