Colton Orr knocked out Flyers forward Todd Fedoruk with a hard punch 21 seconds into the game in response to Philadelphia's rough play in the last meeting on Feb. 17. Fedoruk was removed from the ice on a stretcher and taken to St. Vincent's Hospital and kept overnight.
Henrik Lundqvist shined again, making 17 saves for his second shutout in three games.
Fedoruk and teammate Ben Eager combined for four roughing penalties and a misconduct in the first period of Philadelphia's 5-3 victory last month, a game best remembered for the violent accidental collision between Shanahan and Flyers forward Mike Knuble.
Orr didn't dress for that game, a move Rangers coach Tom Renney said he regretted, but Orr quickly made his presence known in the rematch. He squared off with Fedoruk in the Philadelphia zone and flattened the hard-hitter with a right hand to the left cheek. Fedoruk went down on his back, was strapped to a board, and had his head immobilized before being wheeled off.
"Todd is doing fine," Rangers neurologist Claude Macaluso said in a statement. "He is awake. He is having some problems with short-term memory, but other than that he is great. There are no neurological problems at all.
"We scanned him basically from the top of his head right down to the bottom of his neck. There are no fractures, (his) brain looks fine. He is going to be fine."
Shortly after Orr emerged from the penalty box, he took on Eager. Orr absorbed a punch that sent him to his knees, but wasn't injured. After he returned to the bench following a second-period interference penalty, Renney gave him pats on his shoulders and back.
Shanahan helped set up two goals by Sean Avery that pushed the Rangers closer to sixth place in the Eastern Conference playoff race. New York trails Tampa Bay by one point and is three points above the postseason cutoff line.
Petr Prucha, Jaromir Jagr and Jed Ortmeyer also scored for the Rangers, who have surged back into contention with an 8-1-3 spurt. New York went 8-3-4 without Shanahan, who also left the Madison Square Garden ice on a stretcher when he slammed into Knuble.
Shanahan heard chants of "Shanny" when he came on for his first shift Wednesday just over two minutes in. He earned an assist when Avery scored a power-play goal 7:50 into the second period. He nearly netted a goal of his own in the third, but rang a shot off the post.
It didn't matter. A few minutes later, Shanahan took a pass from Ryan Callahan and moved it to Avery for his 16th of the season and fourth in four games.
Knuble played in his fourth game since coming back from a broken cheekbone and orbital bone - sustained in the collision - that required surgery.
At the time, New York's loss to Philadelphia, owner of the NHL's worst record, coupled with Shanahan's injury, seemed to doom the Rangers' playoff hopes. But Lundqvist has been stellar since, and the attention to defence has propelled them.
Lundqvist has five shutouts this season. He has allowed only 12 goals in nine games since his last day off and hasn't given up more than three in a game since Feb. 5, going 11-3-5.
Prucha gave him all the offence he would need 3:40 into the game. Jagr and Avery scored power-play goals 6:24 apart in the second period to make it 3-0. Prucha nearly had his second of the game, but the goal was waved off because he kicked in the puck.
Ortmeyer made it 4-0 and Avery capped the scoring, both in the third period.
Notes: The Flyers had killed all 32 short-handed situations in their previous eight games. The Rangers connected twice in four chances. ... Philadelphia was without forwards Scottie Upshall (shoulder) and Simon Gagne (hip), but both could return this weekend. ... Rangers forward Martin Straka (knee) sat out his second straight game, but is expected back Saturday at Boston. ... Orr took three of New York's four penalties. ... Philadelphia lost for the sixth time in eight games.