We demonstrate a technique to lock the frequency of a laser to a transition between two excited states in Rb vapor using a two-photon process in the presence of a weak magnetic field. We use a ladder configuration from specific hyperfine sublevels of the 5S(1/2), 5P(3/2), and 5D(5/2) levels. This atomic configuration can show electromagnetically induced transparency and absorption processes. The error signal comes from the difference in the transparency or absorption felt by the two orthogonal polarizations of the probe beam. A simplified model is in good quantitative agreement with the observed signals for the experimental parameters. We have used this technique to lock the frequency of the laser up to 1.5 GHz off atomic resonance. (C) 2009 Optical Society of America