in aniline the NH2 group is basic in nature.when in reacts in the presence of acid,the aniline gets protonated. A-NH3+ group is deactivating and meta-directing when it comes to aromatic electrophillic substitutions, thus yielding m-nitroaniline.