Updated

Sam Bradford was in street clothes, and A.J. Feeley was off target with his throws.

That meant a long day for the St. Louis Rams and their offense.

St. Louis struggled to get the ball past midfield and managed only 157 yards of offense while being shut out for the first time in more than two years in a 26-0 loss to the San Francisco 49ers on Sunday.

Just another emotional blow in a season that can't end soon enough for the Rams.

"We didn't do a lot of things very well," said Feeley, who committed two turnovers and was sacked four times. "They had us on our heels the whole time. As soon as we got something going, we somehow staggered a little bit and put ourselves in a bad situation."

Feeley, starting in place of the injured Bradford, was only 12 of 22 for 156 yards. He missed several open receivers, fumbled near the Rams' own goal line and threw an interception on the first series in the third quarter.

The journeyman quarterback didn't get much help from St. Louis' running game, either. Steven Jackson and Jerious Norwood each had 19 yards rushing while the Rams (2-10) were held to a meager 1.3 yards per carry.

"We knew we were facing a team that was looking to clinch the NFC West, so we knew we were going to get their best," Jackson said. "Our defense did a really good job in the first half but overall, (the 49ers) were able to make plays, come up big in defensive situations and eventually they were able to crack it open."

It didn't help that the Rams kept getting hurt.

Feeley injured his right thumb early in the fourth quarter while left guard Jacob Bell left with knee and ankle injuries. Left tackle Adam Goldberg (ribs), defensive end Eugene Sims and cornerback Justin King were also knocked out of the game, but all three returned.

Coach Steve Spagnuolo is optimistic Bradford will be able to play in the Rams' next game at Seattle on Dec. 12.

"He was very sore all the way through and it never really changed," Spagnuolo said. "He was more than willing to give it a shot ... but (we) did not think it was smart to take a chance that something worse could happen to him."

While the Rams are stumbling, the 49ers are surging after clinching the NFC West division title and a spot in the playoffs.

Frank Gore helped run San Francisco (10-2) right into the postseason, becoming the 49ers' career rushing leader by passing late Hall of Famer Joe Perry and finishing with 73 yards.

Alex Smith threw second-half touchdowns of 52 and 56 yards to Michael Crabtree and Kyle Williams, and David Akers kicked four field goals to help Jim Harbaugh join George Seifert (1989) and Steve Mariucci (1997) as the only rookie coaches in franchise history to win a division title.

The only downer came when star linebacker Patrick Willis left the game in the first half with a right hamstring injury.

San Francisco became the NFL's second team to secure a playoff berth behind defending Super Bowl champion Green Bay.

Despite further problems converting in the red zone early, San Francisco shut out an opponent for the first time since a 35-0 home win at Candlestick Park on Oct. 4, 2009. That was also the Rams' last shutout.

The Niners also avenged a late-season loss from 2010 that was still plenty fresh. They had won five straight before losing at St. Louis in the second-to-last week.

Smith, who didn't start that last game against the Rams, completed 17 of 23 passes for 274 yards with four sacks and no interceptions to finish with a career-high 142.3 quarterback rating.

Gore ran for 2 yards early in the second quarter to give him 7,345 career yards rushing, moving him past Perry (7,344) for most in franchise history.

Akers kicked a 36-yard field goal on San Francisco's second possession of the game to go up 3-0 with 4:54 left in the first quarter.

Ray McDonald knocked the ball away from Feeley midway through the second quarter to force a fumble and Aldon Smith recovered deep in St. Louis territory. That gave the 49ers first-and-goal at the 6, but they again failed to get into the end zone, settling for Akers' 19-yard field goal.

"We just can't seem to put anything together," Feeley said. "We have to do a better job, plain and simple."

Akers booted a 28-yarder 1:41 before halftime for his 31st field goal of the year, topping Jeff Wilkins' single-season franchise mark of 30 set in 1996.

That gave the 49ers nine field goals — with only three TDs — in the last 14 trips to the red zone before Crabtree's TD catch.

Davis dropped a would-be 40-yard touchdown catch in the end zone late in the second quarter on a perfectly thrown pass from Smith. Davis later had a catch and fumble for San Francisco, which hasn't scored a first-half touchdown since Week 9 at Washington.

Rams DE Chris Long's second-quarter sack on Smith gave him one in six straight games.

"The effort's always there with this group," Long said. "That's not something I feel like anybody can question, but execution can definitely be questioned. The effort's good, but that's not going to win us any ballgames."