The proton-proton momentum correlation function from different rapidity regions are systematically investigated for the Au + Au collisions at different impact parameters and different energies from 400$A$ MeV to 1500$A$ MeV in the framework of the isospin-dependent quantum molecular dynamics model complemented by the $Lednickacute{y}$ and $Lyuboshitz$ analytical method. In particular, in-medium nucleon-nucleon cross section dependence of the correlation function is brought into focus, while the impact parameter and energy dependence of the momentum correlation function are also explored. The sizes of the emission source are extracted by fitting the momentum correlation functions using the Gaussian source method. We find that the in-medium nucleon-nucleon cross section obviously influence the proton-proton momentum correlation function which is from the whole rapidity or projectile/target rapidity region at smaller impact parameters, but there is no effect on the mid-rapidity proton-proton momentum correlation function, which indicates that the emission mechanism differs between projectile/target rapidity and mid-rapidity protons.