We report on the realization of a rewritable and local source inside a Si-based photonic crystal microcavity by infiltrating a solution of colloidal PbS quantum dots inside a single pore of the structure. We show that the resulting spontaneous emission from the source is both spatially and spectrally redistributed due to the mode structure of the photonic crystal cavity. The coupling of the quantum dot emission to the cavity mode is analyzed by mapping the luminescence signal of the infiltrated solution with a scanning near-field optical microscope at room temperature. Spectral characterization and the mode profile are in good agreement with a three-dimensional numerical calculation of the system.