A good route is via BLR. It is only about a 2hr flight from there. Disadvantage is that they fly a 3-class 777 to BLR and it arrives at 04:50 in the morning so you might be in for a bit of a wait for your connection.
Chennai (MAA) may be a better alternative although the airport is a lot worse. I don't know the flight times.
Maldives is actually a lot further from Sri Lanka than most people think.