Shortest path plays an important role in the study of complex networks. But in real transportation systems, choosing the shortest path may not be the best way for the drivers. Based on the traffic equilibrium theory, we generalize the concept of shortest path. Flux distribution is also investigated by using the generalized concept on various types of complex networks. We find that the flux differs little in all the edges of lattice while in small-world and scale-free networks, the flux distribution follows a power law, and in the random network, the flux distribution has an exponential tail. We consider lattice may be the optimal topology in design a transportation network.