First-half goals from Ashley Chambers and Jason Walker gave York a comprehensive victory over Luton.
Chambers put the Minstermen ahead when he curled the ball into the top left-hand corner from just outside the area.
Walker doubled the lead when he placed his low 18-yard shot into the corner of the net, before crossing for Chambers to volley in from close range.
Luton came close when Jamie Hand shot over from close range, but could not find a way past the York defence.
York climb a place to fifth, above morning leaders Luton, who drop from first to sixth.
VIEWS FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"If we do our jobs and do them well we win football matches and we've done it again today.
"We didn't get our rewards on Tuesday that I felt we deserved but we've gone and done it today and got the goals and the three points that we absolutely deserved.
"With the tempo we played today I thought we were superb."
York 24 Ingham 03 Meredith 05 McGurk Booked 16 Fyfield 08 Kerr 15 Boucaud 20 Challinor 26 McLaughlin 07 Reed (Moke - 66' ) 09 Walker (Henderson - 90' ) 10 Chambers (Blair - 75' Booked ) Substitutes 04 Smith 06 Parslow 17 Blair 18 Moke 11 Henderson Luton 01 Tyler 15 Howells 17 Antwi 27 Hand 34 Kovacs 04 Keane Booked 07 Lawless Booked (Watkins - 46' ) 11 Willmott Booked 19 Dance 20 Kissock (O'Connor - 45' ) 13 Fleetwood (Crow - 80' ) Substitutes 30 Pilkington 16 Asafu-Adjaye 28 Watkins 10 Crow 14 O'Connor