Towards the beginning of Parashat Shoftim, the Torah issues a prohibition against planting a tree “next to the altar of the Lord your God” (16:21). Rashi, citing the Sifrei, explains that this prohibition forbids planting trees anywhere on the Temple Mount. This is in contrast to the view of the Rambam, who writes in Hilkhot Avodat Kokhavim (6:9) that the prohibition applies only in the azara (Temple courtyard), and not elsewhere on the Temple Mount. The Kessef Mishneh commentary notes that the Rambam’s ruling is based on a second view cited by the Sifrei, in the name of Rabbi Eliezer ben Yaakov.
Rashi, in his commentary to this verse, writes that this prohibition includes also “boneh bayit” – building a wooden structure on the Temple Mount. In Rashi’s view – which is also cited from the Sifrei – when the Torah forbids planting trees in the area of the Temple, this includes making structures from wood. A number of later writers (Rav Eliyahu Mizrachi, and Maharal, in Gur Aryeh) explained that this interpretation of the verse stems from the fact that the Torah forbids planting “kol etz” – “any tree” – which could be understood as including all wooden structures. The Ramban disagrees with Rashi’s interpretation, noting that the Torah formulates this prohibition in terms of planting – “lo tita” (“do not plant”), which cannot be interpreted as referring to building a structure. In the Ramban’s view, building a structure on the Temple Mount is forbidden only by force of rabbinic enactment, and does not fall under the Torah prohibition. This is also the opinion of the Rambam (Hilkhot Avodat Kokhavim 6:10).
Interestingly, Siftei Chakhamim suggests defending Rashi’s explanation based on Rashi’s own comments in a much different context. In Sefer Bamidbar (24:6), we read Bilam’s effusive description of Benei Yisrael’s tents, comparing them to – among other things – “ahalim nata Hashem.” Targum Onkelos translates the word “ahalim” as referring to fragrant plants, but Rashi – after citing Onkelos’ translation – adds that “ahalim” could be understood to mean “tents,” such that “ahalim nata Hashem” could be translated as, “like the heavens which God spread like a tent.” Rashi adds that although the verb n.t.a. (“plant”) is normally used in reference to vegetation, it is also occasionally used in reference to pitching a tent. As a prooftext, Rashi cites a verse from Sefer Daniel (11:45) which speaks of a king “planting” his palaces, which are referred to as “ohalei apadno” (“his royal pavilion”). If so, then here in Parashat Shoftim, too, where the Torah forbids “planting” trees in the area of the Beit Ha-mikdash, this could be extended to include even building wooden structures, once it has been established that even erecting structures could be described with the verb “n.t.a.”