Nick Foles knows all about taking over as the Philadelphia Eagles' quarterback at the Los Angeles Memorial Coliseum and guiding his team to a victory.

Starting in place of injured Carson Wentz on Sunday night, Foles threw for 270 yards and the visiting Eagles (7-7) improved their playoff chances with a 30-23 victory over the Los Angeles Rams, who have lost consecutive games for the first time this season.

Wentz was also injured in a December game at Los Angeles last season, with Foles finishing off that victory and then guiding the Eagles to a Super Bowl title.

On this night, the Rams (11-3) looked out of sorts for the third consecutive week since their dynamic 54-51 Monday night victory over the Kansas City Chiefs on Nov. 19.

The Rams entered third in the NFL at 32.7 points per game, but they have averaged only 19.7 points while going 1-2 over the last three weeks.

Rams quarterback Jared Goff was 35 of 54 for 339 yards and had two more interceptions Sunday, giving him seven interceptions in those three games against the Detroit Lions, Chicago Bears and Eagles.

Wendell Smallwood rushed for two touchdowns and Josh Adams added another on the ground as the Eagles rebounded from an overtime loss at Dallas and have won three of their last four games.

Rams running back Todd Gurley rushed for two touchdowns, to give him 17 scores on the ground this season and 21 overall.

Goff moved past the 4,000-yard mark this season, becoming just the fourth quarterback in Rams history to do so in a season.

The Rams had one last chance to tie the game, getting the ball back with 1:08 remaining at their own 43-yard line before advancing to the Eagles' 18. But Goff threw an incomplete pass toward the end zone as time expired.

The victory moved the Eagles a half-game out of the NFC's final playoff spot.

The Rams continue to have the second-best record in the NFC behind the New Orleans Saints, but they are now just one game ahead of the Bears. The top two teams earn a first-round bye in the playoffs and the Bears own the tiebreaker over the Rams thanks to their win last Sunday.