The 49ers bounced back from an embarrassing loss to the Dolphins by beating the Rams on Sunday night.