Welcome to WebmasterWorld Guest from 3.231.229.89

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

rewrite question

     
8:56 am on Jul 3, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 29, 2004
posts: 65
votes: 0


I have a client that uses an ecommerce system which, when a product is placed in multiple categories the product page is duplicated and a -1 is added to the end.

So the pages are:

original-product-page.html

and when added to a 2nd category
original-product-page-1.html

and when added to a third category
original-product-page-2.html

and so on

this obviously causes issues in terms of on site duplicate content - dilution of pr etc.

is there a way of rewriting a page in htaccess so when the page that is requested ends in a -1, or -2 or whatever that page is 301'd back to the original product page?

thanks for the help.

2:10 pm on July 3, 2008 (gmt 0)

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


Yes, but this is of questionable utility, since the links on the pages will still be "wrong."

You'll do better to see if you can find a "plug-in" for that e-commerce package that will stop the "-1" links form being published in the first place. Once that is done, you can optionally do the redirect (which is trivial using mod_alias or mod_rewrite) to speed up the clean-up of search engine results. When you get to that point, see the Apache mod_alias RedirectMatch and mod_rewrite RewriteRule documentation, and then post your best-effort code as a basis for discussion.

Jim

2:54 pm on July 3, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 29, 2004
posts: 65
votes: 0


ok, thanks for the help
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members