0

I have a problem with duplicate content...

my links are like this:

  • original: www.example.ro/men-shoes/
  • duplicate: www.example.ro/men-shoes/pagina-1/
  • original www.example.ro/women-shoes/
  • duplicate: www.example.ro/women-shoes/pagina-1/

and other similar pages that has /pagina-1/ at the end

I am not good at mod rewrite.. but i tryed this code

RewriteCond %{QUERY_STRING} ^pagina-1/$
RewriteRule ^(.*) $1 [L,R=301]

it dosen't work... I would be glad to solve this!

thanks!

user1483138
  • 57
  • 1
  • 1
  • 7

2 Answers2

0

There's no need to use mod_rewrite for this. What you want to use is the rel=canonical tag.

http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394

This tag is supported by all major search engines.

So, for the two above examples, the following would be in the head of both pages (i.e. in both www.example.ro/men-shoes/ and www.example.ro/men-shoes/pagina-1/)

<link rel="canonical" href="www.example.ro/men-shoes/" />

In essence, this means "assign any link value pointing at the duplicate to the original."

This:

  • stops both appearing in the SERPs
  • assigns any link value from the duplicate to the original
  • does not impose any further mod_rewrite pattern matching overhead.

If the /pagina-1 page is the first paginated page in a product list (I guess it is), you might also want to try using the rel and prev tags.

http://googlewebmastercentral.blogspot.co.uk/2011/09/pagination-with-relnext-and-relprev.html

Bob C
  • 529
  • 1
  • 3
  • 10
  • Thank you for your sugestion. But it`s more easyer for me to use mod_rewrite, because all my pages have dynamic content, and with canonical i will have a lot of code to edit... and write more php code.. – user1483138 Aug 02 '12 at 10:44
0

Try:

RewriteRule ^(.*)/pagina-1/$ /$1/ [L,R=301]
Jon Lin
  • 142,182
  • 29
  • 220
  • 220