The Standard approach is to allow the rebid to be pretty much anything, but that (in particular in K/S) forces a rebid by responder and leaves the auction unclear. (Playing Standard, who is responsible for starting the search for a 4-4 major suit fit?)
A set of rebids, attributed to Eric Kokish, attempts to handle these problems. They were designed for use along with a weak NT, but work with any NT range. I'll assume 15-17 NTs and others can transpose from there.
2D=5+ diamonds and 1 round forcing 2H = 4441 hand 2S=good club raise 2NT= balanced hand with 12-14 HCP 3C=bad club raise 3D=16+ HCP, good 6 card diamond suit 3H,3S = splinter in support of clubs 3NT= 18-19 balanced
Responder's major suit rebid is normally a 4-card suit, but can sometimes be just a stopper; opener is not expected to go past 3NT. Opener's 2S and 3C deny a four-card major, but 2D often contains one.