pagans, including hindus, budhists, jains, tribal religions were and are accepted under Muslim rule as protected. In fact, it is prohibited to harm them in any way or their places of worship. Any criminal excess against them is considered punishable on an equal footing as an excess against a Muslim, as all are people of God, and there is no compulsion in religion. What mughal or local or foeign invader kings and lords did has nothing to do with islamic law. Our prophet alayhisalam said not to curse the religion of the pagans, nor insult them on their face lest it hurt them, which would be considered a sin for a Muslim. Jizya or tax was leveled on able bodied male non-muslims who did not participate in the government military activities. Discriminatory dress codes were localized and temporary, largely based on local court rulingsThis is based on the Hanafi and Shafii Schools of jurisprudence, which 95% of Muslims in South Asia followed until 1857. Shari'a is the general word for these schools of law.
in south asia, before 1857, the Muslim population was primarily Sunni Sufi of the Hanafi school of jurisprudence except for Kerala, South Tamil Nadu, and Konkan, that were and still are dominated by the Shafi'i school.