INGLEWOOD, Calif. (AP) — Rookie Joshua Karty hit a 37-yard field goal with 2 seconds to play, and the Los Angeles Rams staged a spectacular late rally for a 27-24 victory over the San Francisco 49ers on Sunday.