I've already checked a lot of resources all over the Internet but could not solve this issue.
I have a very old site, custom built, which had this silly structure like:
examplesite.com/example.php?id=1777
With my unfulfilled coder ambition I decided to clean up URLs to:
examplesite.com/example/1777
To achieve this I used:
RewriteRule ^example/(.*)/?$ example.php?id=$1 [L]
and it pretty much is a zenith of my abilities.
So I left it for a while, traffic dropped to minimum and I reminded myself that this rewrite generated a lot of duplicate content.
So my question is - how do I make sure only /item/177 version is accessible/indexed? I guess 301 will do but how?
It's not an important issue but something which makes my brain itchy since it's a unsolved problem...
Thank you for attention and any help.
I have a very old site, custom built, which had this silly structure like:
examplesite.com/example.php?id=1777
With my unfulfilled coder ambition I decided to clean up URLs to:
examplesite.com/example/1777
To achieve this I used:
RewriteRule ^example/(.*)/?$ example.php?id=$1 [L]
and it pretty much is a zenith of my abilities.
So I left it for a while, traffic dropped to minimum and I reminded myself that this rewrite generated a lot of duplicate content.
So my question is - how do I make sure only /item/177 version is accessible/indexed? I guess 301 will do but how?
It's not an important issue but something which makes my brain itchy since it's a unsolved problem...
Thank you for attention and any help.