I like this way of handling it. Try adding: yourSPAPageRoute/* on the server side to get rid of this problem.
I went with this approach because even the native HTML5 History API doesn't support correct redirection on page refresh (As far as I know).
Note: Selected answer has already addressed this but I'm trying to be more specific.
Tested and just wanted to share this.
Hope it helps.