Finally tracked down the short story I mentioned in my comment to the original question, and that Jeff mentioned in his answer:
See if this sounds about right: "The City" — A rocket expedition from Earth lands on an uncharted planet to be greeted by a seemingly empty city.
As the humans begin to explore, they realize that the city is not as empty as it seems.
The city was waiting for the arrival of humans; the contingency plan of a long dead civilization, put in place to take revenge upon humanity after their culture was wiped out with biological weapons by humans long before recorded history.
Once the city captures and kills the human astronauts, the humans' corpses are used as automations to finalize the city's creators' revenge; a biological attack on the Earth.
It's from Ray Bradbury's 'The Illustrated Man' compilation.
http://en.wikipedia.org/wiki/The_Illustrated_Man
scifi.stackexchange.com/users/2292/K-H-W
I read a fantastic short story that sounds similar and I've wanted to rediscover it for years.
The plot was about a planet created as a trap.
Long-dead victims of Earth(?)
aggression, realizing they would be wiped out, create a giant trap to wipe out Earth generations in the future.
Over the eons, the people of Earth forget about the war and the enemy planet but eventually rediscover it - just as their ancient victims foresaw.
The machine eviscerates the explorers and fills their bodies with a virus or other nasty thing and then sends them back to Earth to exact revenge.
I remember my brother and I talking about it enthusiastically around, oh, 1978 or so.
No idea of the name, but it would have been in a SF anthology.
scifi.stackexchange.com/users/2618/Jeff
There are a couple of similar instances in Simon Green 's Deathstalker saga.
An expedition is sent into an alien city to retrieve some bio-weapons, and many people in the expedition are killed or vanish due to a variety of horrific alien traps.
Similarly, attempts to navigate the " Madness Maze ", another alien artifact, result in people being lost, physically rearranged, driven insane, etc..
scifi.stackexchange.com/users/1359/Beofett
Sounds a bit like Robert Silverberg 's The Man in the Maze but only a little bit.
scifi.stackexchange.com/users/1035/Jackson
Might also be Rogue Moon by Algis Budrys.
scifi.stackexchange.com/users/23/Mike Scott
Many years ago I read a book or story where a group of people discover a dark city - maybe on another planet - which appears devoid of life but is in very good condition. As they gradually explore the city one of the them falls into a trap and is cut to pieces by something mechanical. This detail I can remember as it was a pretty gruesome idea. I don't know the ending but my guess is that none of them make it out alive.
Book or short story about an empty city with deadly traps
scifi.stackexchange.com
<story-identification><space-exploration><city>
scifi.stackexchange.com/questions/4329
scifi.stackexchange.com/users/1808/James P.
Similar instances are said to occur in  Simon Green 's  "Deathstalker" saga. Robert Silverberg 's  "The Man in the Maze" is another suggestion, as well as "Rogue Moon" by Algis Budrys. The book in question with the death traps may be Deathstalker Saga, The Manin the Maze or Rogue Moon.
The book in question with the death traps may be Deathstalker Saga, The Manin the Maze or Rogue Moon.