Traffic grooming in optical WDM mesh networks is a two-layer routing problem to effectively pack low-rate connections onto high-rate lightpaths, which, in turn, are established on wavelength links. The objective of traffic grooming is to improve resource efficiency. However, resource contention between lightpaths and connections may result in inefficient resource usage or even the blocking of some connections. In this work, we employ a rerouting approach to alleviate resource inefficiency and improve the network throughput under a dynamic traffic model. We propose two rerouting schemes, rerouting at lightpath level (RRLP) and rerouting at connection level (RRCON) and a qualitative comparison is made between the two. We also propose two heuristic rerouting algorithms, namely the critical-wavelength-avoiding one-lightpath-limited (CWA-1L) rerouting algorithm and the critical-lightpath-avoiding one-connection-limited (CLA-1C) rerouting algorithm, which are based on the two rerouting schemes. Simulation results show that rerouting reduces the blocking probability of connections significantly.