- For Einstein's general relativity (GR) or the alternatives suggested up to date, the vacuum energy gravitates. We present a model where a new measure is introduced for integration of the total action in D-dimensional spacetime. This measure is built from D scalar fields Phia. As a consequence of such a choice of the measure, the matter Lagrangian Lm can be changed by adding a constant while no gravitational effects, such as a cosmological term, are induced. Such a nongravitating vacuum energy theory has an infinite dimensional symmetry group which contains volume-preserving diffeomorphisms in the internal space of scalar fields Phia. Other symmetries contained in this symmetry group suggest a deep connection of this theory with theories of extended objects. In general the theory is different from GR although for certain choices of Lm, which are related to the existence of an additional symmetry, solutions of GR are solutions of the model. This is achieved in four dimensions if Lm is due to fundamental bosonic and fermionic strings. Other types of matter where this feature of the theory is realized, are, for example, scalars without potential or subjected to nonlinear constraints, massless fermions, and point particles. The point particle plays a special role, since it is a good phenomenological description of matter at large distances. de Sitter space is realized in an unconventional way, where the de Sitter metric holds, but such de Sitter space is supported by the existence of a variable scalar field which in practice destroys the maximal symmetry. The only spacetime where maximal symmetry is not broken, in a dynamical sense, is Minkowski space. The theory has nontrivial dynamics in 1+1 dimensions, unlike GR.