TEFILAS HA'DERECH [Tefilas ha'Derech]
Gemara
Eliyahu (to Rav Yehudah, brother of Rav Sala Chasida): Before traveling, consult with your Maker.
(R. Yakov): This means that he should say Tefilas ha'Derech.
(R. Yakov): Anyone who journeys must say Tefilas ha'Derech.
Tefilas ha'Derech is "Yehi Ratzon... (may it be Your will to lead me... save me from any enemies...) Baruch Atah Hash-m Shome'a Tefilah."
(Abaye): When one prays, he prays for the Tzibur as well.
He says "may it be Your will to lead us..."
(R. Yakov): The earliest one may say Tefilas ha'Derech is once he is on the road.
Question: What is the Shi'ur for Tefilas ha'Derech?
Answer: It is a Parsah (about four kilometers).
Question: How is it said?
Answer #1 (Rav Chisda): It is said while standing.
Answer #2 (Rav Sheshes): It may be said even while traveling.
Rav Chisda and Rav Sheshes were traveling. Rav Chisda stood (to say it). When Rav Sheshes found out, also he stood;
Rav Sheshes: I agree that this is better, and there is no reason not to. (I want to wait for Rav Chisda anyway.)
Rishonim
Rif (Berachos 20b): It is better to say Tefilas ha'Derech standing, for even Rav Sheshes said that this is better, and he stood.
R. Yonah (DH Rav): The Rif rules like Rav Chisda, for Rav Sheshes holds like him. The Tosafists say that the Halachah follows Rav Sheshes. Letter of the law, one may say it while traveling. Rav Sheshes stood only because there was no reason not to.
R. Yonah (DH uvi'Tefilas): Some say that if one was riding, he need not come down for Tefilas ha'Derech. One need not come down for Shemoneh Esre, and all the more so for Tefilas ha'Derech! Some say that perhaps Shemoneh Esreh is different, for it requires more intent, and if he comes down his mind will not be settled. Tefilas ha'Derech does not need such great intent, so we are not concerned for distraction, so he must come down.
Beis Yosef (OC 110 DH Kasav): The first opinion seems better.
Rosh (4:18): Some (Rashi) explain that the Shi'ur of Tefilas ha'Derech is a Parsah, i.e. one must say it within the first Parsah. This is considered heading on the road. Bahag explains that we say it only for a trip of at least a Parsah. This is primary. If he still has much to travel, why shouldn't he say it?! However, if one goes less than a Parsah, close to the city, this is not dangerous, so he does not bless.
Tosfos (Pesachim 104b DH Kol): Tefilas ha'Derech has a Chasimah, but it does not begin with Baruch! We can say that since it is merely praise and request (it need not begin with Baruch).
R. Yonah (1a DH Ela): If a Berachah is Samuch l'Chavertah in its place, even when we say it elsewhere where it is not Samuch, we say the same text (even though it does not begin with Baruch). Tefilas ha'Derech does not begin with Baruch, and ends with Shome'a Tefilah. Since in Shemoneh Esreh it is Samuch l'Chavertah, we are not concerned if now it is not Samuch.
Poskim
Shulchan Aruch (OC 110:4): One who journeys prays "Yehi Ratzon...' One must say it in the plural (bring us to Shalom).
Beis Yosef (DH ha'Yotzei): Rashi explains that since he prays for the Rabim, his Tefilah is heard.
Kaf ha'Chayim (38): Even if he travels alone, surely someone else in the world is traveling at the time.
Kaf ha'Chayim (14): Beis Yakov gives a text for one who travels on the sea.
Magen Avraham (10): Only a Tefilah fixed for the Rabim (is said in the plural), like it says in (Rema) Siman 565:1. (Even an individual who fasts says "Aneinu..." in the plural.) However, the word "u'Sneni" is in the singular (Sefer ha'Kaneh, based on Kabalah).
Mishnah Berurah (18): B'Di'eved, he was Yotzei even if he said the entire text in the singular.
Mishnah Berurah (19): When one requests something for himself (in his own words), he may request in the singular.
Shulchan Aruch (ibid.): If possible, one must stop going when he says it. If he was riding, he need not descend.
Beis Yosef (DH u'Mah): The Rif and Rosh say that it is better to say Tefilas ha'Derech standing. (Note: the Rosh said it is better to say it standing. He could refer to the short Tefilah of travelers (29b), like the Rashba explains. However, he was discussing Tefilas ha'Derech, so presumably he refers to this.) Tosfos says that we hold like Rav Sheshes, but brings that Rabbeinu Yosef says that it is better like Rav Chisda. R. Yonah and the Rashba say that letter of the law, the Halachah follows Rav Sheshes. Rav Sheshes stood only because there was no reason not to.
Note: The Rashba says so about the "short Tefilah." Perhaps the Beis Yosef explains, like Tzelach, that this includes Tefilas ha'Derech.
Mishbetzos Zahav (4): The Pri Chodosh (4) explains that the Rambam explains that Rav Sheshes (and Rav Chisda - PF) discuss whether one must stand for the short Tefilah.
Magen Avraham (11): If possible, he should stop the animal, for riding is like walking.
Gra (DH v'Im): This is like we say regarding Tefilah.
Mishnah Berurah (23): Likewise, one sitting in a wagon need not descend. However, if possible he should stop the horses.
Kaf ha'Chayim (45): If one can stand in the wagon, this is better than sitting.
Shulchan Aruch (6): When Maharam me'Rotenburg would travel, in the morning he would say Tefilas ha'Derech after Yehi Ratzon, in order to make it Samuch to Birkas ha'Gomel Chasadim, so it will be Samuch l'Chavertah.
Beis Yosef (DH veha'Ram): Kol Bo says that Maharam said that Tefilas ha'Derech is Samuch to one of the Berachos that begins with Baruch, e.g. Asher Nasan la'Sechvi Vinah.
Magen Avraham (12): He says the Berachos on the road, for one may not say (Tefilas ha'Derech) until he begins traveling.
Magen Avraham (13): If one travels in the middle of the day, he should say it Samuch to another Berachah. E.g. he eats or drinks and says a Berachah Acharonah, or urinates and says Asher Yatzar.
Gra: This is like the Rosh and Ge'onim, who say that Elokai Neshamah does not begin with Baruch because it is Samuch to Asher Yatzar. The Ri explains that it is thanks, and here (Tefilas ha'Derech does not begin with Baruch and need not be Samuch l'Chavertah because) it is Tefilah.
Mishnah Berurah (27): This was when he was forced to leave early, before Tefilah. When he left after praying, he could not say Tefilas ha'Derech beforehand, for one must start his journey first.
Mishnah Berurah (28): If one does not have anything to eat or drink, and cannot urinate, e.g. he travels with people who do not want to wait for him to descend and alight again, he may say Tefilas ha'Derech, for several Rishonim say that it need not be Samuch l'Chavertah.
Kaf ha'Chayim (51): Baruch she'Amar says that if one will travel after Shacharis, he should leave one of the Birkos ha'Shachar to say it after Tefilah, and say Tefilas ha'Derech after it. According to Kabalah, this is wrong. There is a reason why Birkos ha'Shachar must be before Tefilah.
Shulchan Aruch (7): One says Tefilas ha'Derech only after starting the journey. If he will travel less than a Parsah, he closes without a Berachah. L'Chatchilah, he says it in the first Parsah.
Birkei Yosef (10): In Sha'ar Yosef (Horayos 4a), I showed that one may bless once he left his house to go, even if he is still in the city.
Sha'arei Teshuvah (9): Shevus Yakov (2:46) says that when leaving one's house he should not bless until he goes on the road, but if he is already in a lodging (e.g. hotel), he may say it before going (to resume traveling).
Mishnah Berurah (29): This means that he should not say it until leaving the city and its Ibur, i.e. a little more than 70 Amos past the last houses of the city. The Taz permits even in the city, once he resolved and is ready to go, but the Acharonim disagree. B'Di'eved, if one blessed then, he relies on the Taz. Once he started traveling, on future days we hold like the Taz.
Kaf ha'Chayim (49): Also, if he did not yet leave the city and its Ibur, perhaps he will reconsider and not go on the journey, and his Berachah was l'Vatalah.
Kaf ha'Chayim (56): If one goes in a dangerous place, he says Tefilas ha'Derech even if he will go less than a Parsah.