Valley came through another tough away assignment in Northamptonshire to record a hard fought for three points at Compton Park.
Hosts Cogenhoe came into the game on the back of a long unbeaten run, and they took a 33rd minute lead before Town hit back three times through a Fazel Koriya double and another strike for Lewis Rankin - with a late consolation for United following deep into added time.
Rugby were without suspended trio Liam Francis, Dom Perkins and Danico Johnson, which meant a rare place in the starting line-up for both Daniel Kavanagh and Harry Holloway.
The visitors started well, and there was a decent early chance for Charlie Evans after he had played a neat one-two with Simeon Tulloch, but the resulting shot was taken comfortably low down by United keeper Stuart Lutter.
The home side's direct tactics were soon starting to pay dividends though, and Matt Hill gathered a Liam Tuck header and Ryan Ansell also put his effort straight at the Town goalie.
Valley were still creating chances of their own however, and after Richard Blythe, Rankin and Holloway had combined well in the middle of the park, Koriya almost skipped around Lutter with the ball.
Koriya tested Lutter again shortly after, but the Cogenhoe keeper was able to push his well-struck half volley over for a corner, with Blythe heading the resulting set-piece into Lutter's hands.
The end-to-end nature of the game continued with another Hill save to Ansell's effort, before the deadlock was broken when Charlie Hynam's corner was headed back across the box by Jack O'Connor to provide Ryan Dove with a straightforward headed finish.
The hosts' advantage was short-lived though, and Rugby were level within six minutes when Rankin released Koriya who took advantage of a slip by a defender to cut inside and fire home.
Just ahead of the interval, Hill tipped over a goalbound header by Sean McBride, but a flag from the referee's assistant meant it would have been ruled out anyway without Hill's commendable contribution.
Cogenhoe's long-ball strategy continued to cause Town problems after the break, but it was the visitors that took the lead on 56 minutes through an excellent low strike from twenty yards by Rankin after Evans had initially broke down the right wing.
Rankin was soon contributing at the other end by blocking a powerful shot by Dove with his body, before Rugby were handed a vital two goal cushion when referee Ryan Allison spotted an infringement in the Cogenhoe box from a corner to give Koriya the opportunity to tuck home a penalty - albeit off the post.
Valley sub Jamal Adams sent a speculative shot from distance just wide, before Koriya was denied his hat-trick when he headed one against the bar.
Dove then scored a cracker for the hosts in the 95th minute when he gave Hill no chance with a fierce drive from twenty five yards, but it came too late to effect the game's ultimate outcome.
Line-up: Hill; Rosser, Recci, Steele; Tulloch (Adams), Kavanagh, Blythe, Holloway (Blake), Evans; Rankin (Marsden), Koriya. Subs not used: None. Booked: Rankin.
Cogenhoe line-up: Lutter, Barnell, Tuck, McBride, O’Connor, Lowery, Hynam, Stone, Ansell, Dove, Dore. Subs: Melling, Iaciofano, Long, Stevenson.