Using Monte Carlo simulations, we determine the scaling form for the probability distribution of the shortest path l between two lines in a three-dimensional percolation system at criticality; the two lines can have arbitrary positions, orientations, and lengths. We find that the probability distributions can exhibit up to four distinct power-law regimes (separated by crossover regimes) with exponents depending on the relative orientations of the lines. We explain this rich fractal behavior with scaling arguments.