I am replacing a ceiling fan and there is a red, black and white wire in the ceiling box. It appears the switch is connected to the black (top connection) & red (bottom connection) on the light switch. The ceiling fixture only has a black & white wires.
When I connect black to black and white to white the light stays on but the switch doesn't work. I tried to connect black to black and red to white but it didn't seem to work either. Can you tell me what the proper configuration should be?