In mobile ad hoc networks on-demand routing protocols are very attractive due to low overhead. In these protocols, however, (1) the routes tend to contain weak links that have a low rate and high packet error ratio; (2) the routes are susceptible to breaks in the presence of mobility. Our major concern in this paper is to locally optimize the routes in the on-demand routing protocols in terms of link quality and mobility. The local optimization is realized by two main techniques: relating link metric with received signal strength and preferring the route with a shorter metric through Trigger Update (TU). In this manner the initial routes converge to the local optimum in the static case, and adapt to topology variations and link quality changes caused by mobility. Also, the routing overhead is controlled. Simulation results show that AODV with the application of local optimization (AODV-TU) achieves a much higher performance than the original AODV.