The Talmudic source of this halachah actually states “the tefach close to the street,” and this formula is quoted by many classical authorities. The Sages explain that this placement ensures that the entire house is protected from mazikin and that one sees it immediately upon entering the house. This would explain why many people follow this practice only on their outer doors.
However, Shulchan Aruch and Rambam use the wording “tefach close to the outside.” This could also imply that the mezuzah should be affixed to the “outside” tefach of each room. Because of this formulation, most contemporary authorities suggest that it is appropriate to apply this rule to internal doorways as well.
 Divrei Yetziv Y.D. 191:2.
 Shulchan Aruch Y.D. 289:2; Rambam, Hilchos Sefer Torah 6:12.
 Minchas Elazar 2:6-7; Agur B’ohalecha 13:5. Sha’arei HaMezuzah (12:7) reports that this is the custom at present.