> Which is a problem because if they type it in directly I want to render on the server
Why? What difference does the precise way they navigated to the URL make?
> if they hit the back button I want to do xhr.
Most back buttons have a popup menu which let users go to a completely arbitrary url they've already seen, they're not limited to the very last page. They can also hit the button several times to go back to the same page.
> What am I doing wrong?
You're adding arbitrary separations between two instances of the same event: your users going from your site to your site.