I have rewritten url to shorten using .htaccess
Original url: `domain.com/content.php?language=en§ion=1&english_page_id=5&shortname=page-name`
New url: `domain.com/en/1/5/page-name`
I am using the rewrite rule
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /content.php?language=$1§ion=$2&english_page_id=$3&shortname=$4 [L]
I have noticed from Google Web Tools that the url is being logged under various url's and therefore appearing as duplicated content. Investigating this it would appear that my url rewrite is also allowing a blank entry after the final slash.
Duplicated URL's
domain.com/en/14/5/
domain.com/en/14/5/anything
domain.com/en/14/5/ anything
domain.com/en/14/5/any thing
Any help would be appreciated
You need to include the canonical URL - ie the authoritative url for the page content. This is basically a <link>
tag in <head>
with the address you want Google to log instead of the actual one.
See http://googlewebmastercentral.blogspot.gr/2009/02/specify-your-canonical.html
In your provided example, you could add the tag
<link rel="canonical" href="http://domain.com/en/1/5/page-name" />
in the <head>
of your page, and Google would treat all links with this content as the same page.