By utilizing the intensity- and duration-dependent heating and expansion rate of nanoplasma to generate a transient transverse gradient of the refractive index, prepulse controlled laser-beam propagation is demonstrated. The dynamical response of the macroscopic optical refractive index is traced back to the microscopic polarizability of nanoplasmas experimentally, in accordance with hydrodynamic nanoplasma models. In particular, the delay between the prepulse and the main pulse for maximum Rayleigh scattering is found to be longer than that for maximum x-ray emission, supporting the more refined one-dimensional self-consistent hydrodynamic nanoplasma model.