Two URLs pointing to almost the same content
If I have a page, that has this url:
but can also be accessed through these urls:
where the last number is used as an image-index to display a certain image on the page. So the content of the pages are the same, just with one image changed.
How do I avoid google indexing the versions with /number at the end, so it only shows up once in searches - and is not considered duplicate content?
Is it enough to put a rel="nofollow" on links to the /number links?