If you use html5mode on IE9, IE8 it fails with 10 $digest() iterations reached.
There was an issue with location.replace method isn't changing the location.href immediately.