Rigidity for a class of Coxeter groups