“If it goes up to Beth-shemesh.” The Philistines are making very sure that what has happened to them was indeed the hand of Yahweh by even picking the city that the cows had to walk towards.
“the road of his territory.” That is, the road that is in Yahweh’s territory, as we see as the sentence develops.