In cavity quantum electrodynamics (cQED), how an atom behaves in a cavity is what people care about. The coupling strength (g) between cavity field and atoms plays a fundamental role in various QED effects including Rabi splitting. In the solid-state case, when an atomic-like two-level system such as a single quantum dot (QD) is placed into a cavity, Rabi splitting would occur if g is strong enough. In the classical limit, when a QD in a cavity changes into a classical oscillator, the normal-mode splitting would also take place. It is known that g relies on the local fields at the places of the QDs or classical oscillators inside the cavity. However, for both cases, the traditional cavity modes involved are all in the form of standing waves and the localized fields are position-dependent. To ensure strong coupling between QDs or classical oscillators and photons, they should be placed right at the place where the cavity field is maximum, which is very challenging. How is the positional uncertainty overcome? Recently, the peculiar behaviors of electromagnetic (EM) fields inside zero-index metamaterial (ZIM) in which permittivity and/or permeability are zero have aroused considerable interest. In ZIMs the propagating phase everywhere is the same and the effective wavelength is infinite, which strongly changes the scattering and mode properties of the EM waves. In addition to the above characteristics, the fields in ZIM could be homogeneous as required by Maxwell equations. While the special properties of ZIMs are investigated, the fabrication of ZIMs is widely studied. It is found that a two dimensional (2D) photonic crystal consisting of a square lattice of dielectric rods with accidental degeneracy can behave as a loss-free ZIM at Dirac point. To overcome the positional uncertainty, in this paper we propose a cavity filled with effective zero-index metamaterial (ZIM). When the ZIM is embedded in a cavity, the enhanced homogeneous fields can occur under the resonance condition. Finally, experimental verification in microwave regime is conducted. In the experiments, we utilize a composite right/left-handed transmission line with deep subwavelength unit cell to mimic a ZIM and use a metallic split ring resonator (SRR) as a magnetic resonator whose resonance frequency is determined by structural parameters. The experimental results that in general agree well with the simulations demonstrate nearly position-independent normal-mode splitting.